has-passive-events
v1.0.0
Published
Check if passive events are available on the current device
Downloads
718,100
Readme
has-passive-events
Check if event listener options are available on the current device. Try it out.
const hasPassive = require('has-passive-events')
hasPassive ? element.addEventListener('wheel', handler, {passive: true}) : element.addEventListener('wheel', handler)
If you find edge case, please address issues.