detect-event-listener
v1.0.5
Published
Complete feature detection for addEventListener, including its third options parameter and passive events.
Downloads
9
Maintainers
Readme
detect-event-listener
Complete feature detection for addEventListener, including its third options parameter and passive events.
Installation
$ npm install --save detect-event-listener
Usage
Include it and call the function once to do the feature detection.
import { detectEventListener } from 'detect-event-listener';
const optionsSupport = detectEventListener();
/*
{
supportsEventListener: true,
supportsOptions: true,
supportsPassive: false,
supportsOnce: false,
}
*/