detect-event-listener
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

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,
  }
*/

Package Sidebar

Install

npm i detect-event-listener

Weekly Downloads

0

Version

1.0.5

License

MIT

Unpacked Size

8.5 kB

Total Files

7

Last publish

Collaborators

  • mckravchyk