waypoints
waypoints copied to clipboard
Use passive event listener
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
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.
Any plans on implementing this?