waypoints icon indicating copy to clipboard operation
waypoints copied to clipboard

Use passive event listener

Open idoshamun opened this issue 9 years ago • 2 comments
trafficstars

In order to boost scrolling performance, one can use passive event listeners. The only limitation is that the handler can't call preventDefault. Just add { passive: true } as third argument to addEventListener. I hope to create a PR soon

Reference: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener

idoshamun avatar Sep 04 '16 20:09 idoshamun

I think we should use options for this, so the user can set if the handler should be passive or not. I'm working on some code changes to send as PR soon.

yellow1912 avatar Dec 08 '16 13:12 yellow1912

Any plans on implementing this?

piotrkulpinski avatar Feb 01 '21 15:02 piotrkulpinski