Added passive parameter for addEventListener.#569
Added passive parameter for addEventListener.#569kulak-at wants to merge 1 commit intojanpaepke:masterfrom
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 ModuleUse 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