Open ffMathy opened 6 years ago
Please forgive my ignorance, but isn't an event listener always passive? I've never heard of this distinction before.
If I'm not mistaken, passive event listeners cannot cancel the events they receive, while active ones can.
Edit: I recalled it had something to do with scroll performance, turns out I was right: https://developers.google.com/web/updates/2016/06/passive-event-listeners
These days Chrome throws a warning if you use a non-passive event listener for an event that's potentially scroll-blocking, such as a touch event.
Thanks @Rayraz for jumping in, that really helps!
I studied the topic a bit and concluded that it's probably best to wait for https://github.com/jquery/jquery/issues/2871 to be resolved before implementing support in Backbone.
It would be nice if we could set the event handlers created to be passive or non-passive. That way we can also get rid of a warning in Chrome when working with events.