Skip to content

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.

1 participant