1.0.5 • Published 5 months ago

detect-event-listener v1.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

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