jcf
jcf copied to clipboard
Non-passive event listener
I have the following notification in Chrome:
[Violation] Added non-passive event listener to a scroll-blocking 'wheel' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
Reason is this line:
if (self.addEventListener) self.addEventListener(fallbackEvent, fixEvent, false);
I am not skilled enough to write a pull request but it shouldn't be too difficult to rewrite the addEventListener call to make use of the options and make the event handler passive.
There's quite some documentation about this method (including how to keep keep older browsers support when making it passive).
Can you update this please?
Thank you