We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This is a perf enhancement suggested by lighthouse.
When wheel, touchstart, mousewheel, touchmove, orscroll are bound in the template, they should utilize the passive: true property.
wheel
touchstart
mousewheel
touchmove
scroll
passive: true
To achieve this, you could:
@eventOptions({passive: true})
<div @scroll=${{ handleEvent: handleScroll, passive: true }}>
Tricky things to note, these 2 cases should pass:
passive: false
e.preventDefault();
passive
https://web.dev/uses-passive-event-listeners/ https://github.com/GoogleChrome/lighthouse/blob/75735c6b2a2c13f0b92a0b9d00067235ffa21fcc/lighthouse-cli/test/fixtures/dobetterweb/dbw_tester.html#L273
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This is a perf enhancement suggested by lighthouse.
When
wheel
,touchstart
,mousewheel
,touchmove
, orscroll
are bound in the template, they should utilize thepassive: true
property.To achieve this, you could:
@eventOptions({passive: true})
<div @scroll=${{ handleEvent: handleScroll, passive: true }}>
Tricky things to note, these 2 cases should pass:
passive: false
explicitly set to false.e.preventDefault();
it should be fine to bind withoutpassive
.https://web.dev/uses-passive-event-listeners/
https://github.com/GoogleChrome/lighthouse/blob/75735c6b2a2c13f0b92a0b9d00067235ffa21fcc/lighthouse-cli/test/fixtures/dobetterweb/dbw_tester.html#L273
The text was updated successfully, but these errors were encountered: