is-support-passive-events
Determine if the current client support passive events.
New in v1.1.0 : add eventOptions()
to automatically fallback to basic options if passive events are not supported.
Installation
npm install is-support-passive-events
Usage example
;
// When you're declaring your event, check if passive events are supportedconst options = isSupportPassiveEvents? passive: true capture: false: false;document;
eventOptions(options [,fallback])
(function)
Automatically use a fallback if passive events are not supported.
Receives the following parameters :
- options (object)
- fallback (boolean) => Default value:
false
;
document;