Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-passive event listener #51

Open
olafcm opened this issue Dec 22, 2017 · 0 comments
Open

Non-passive event listener #51

olafcm opened this issue Dec 22, 2017 · 0 comments

Comments

@olafcm
Copy link

olafcm commented Dec 22, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant