Closed marcoms closed 6 years ago
By passing the passive: true option to the addEventListener call you can inform the browser that the callback won't preventDefault(). This has noticeable performance benefits -- see https://developers.google.com/web/updates/2016/06/passive-event-listeners
passive: true
addEventListener
preventDefault()
I think would be good to expose this as an option to users of this lib.
By passing the
passive: true
option to theaddEventListener
call you can inform the browser that the callback won'tpreventDefault()
. This has noticeable performance benefits -- see https://developers.google.com/web/updates/2016/06/passive-event-listenersI think would be good to expose this as an option to users of this lib.