JSPM

detect-event-listener

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q38169F
  • License MIT

Complete feature detection for addEventListener, including its third options parameter and passive events.

Package Exports

  • detect-event-listener

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