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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.5
    1
    • latest

Version History

Package Sidebar

Install

npm i detect-event-listener

Weekly Downloads

1

Version

1.0.5

License

MIT

Unpacked Size

8.5 kB

Total Files

7

Last publish

Collaborators

  • mckravchyk