-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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 parameter for addEventListener. #569
base: master
Are you sure you want to change the base?
Conversation
@janpaepke Looking for an update for on this, it's been months and I haven't seen any official word on whether this support was going to be added. |
Thanks for this. |
Hi @kulak-at, Include this feature will be great in terms of performance. My only recommendation is to include the polyfill for the passive instead of use it directly. This can be quickly achieve it if a module is created exporting a Module
Use of the module
|
Any update on this? |
Ping @janpaepke |
@iranreyes sounds solid. could you send a pr? |
Would be great to see this merged in. Seems like such an easy win and it's picked up during site audits with Google lighthouse. |
Hi @kulak-at |
Any progress on this @kulak-at? |
Added
{passive: true}
parameter for all addEventListener calls that does not calle.preventDefault()
. It should increase performance, I've noticed huge performance increase in my project.Documentation reference: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener