are-passive-events-supported
v1.1.1
Published
Check if the browser supports passive event listeners.
Downloads
328,359
Readme
are-passive-events-supported
Check if the browser supports passive event listeners.
Example
import arePassiveEventsSupported from 'are-passive-events-supported'
window.addEventListener(
'touchstart',
() => {
console.log('touchstart')
},
arePassiveEventsSupported() ? { passive: true } : undefined,
)