1.0.0 • Published 6 years ago

has-passive-events v1.0.0

Weekly downloads
93,899
License
MIT
Repository
github
Last release
6 years ago

has-passive-events unstable Build Status

Check if event listener options are available on the current device. Try it out.

npm install has-passive-events

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.