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

added passive listener indication to event handlers, to resolve perfo… #288

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

oranoran
Copy link

@oranoran oranoran commented Aug 5, 2021

Added passive event listener indication so browsers supporting this feature will run faster and smoother.
This addresses these types of warnings seen in Dev Tools (Lighthouse):

[Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952

Using this extra parameter requires feature detection. Instead of adding a third-party feature detection library, embedded feature detection code in a new util module.

Based on:

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

Successfully merging this pull request may close these issues.

None yet

1 participant