JSPM

has-passive-events

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

Check if passive events are available on the current device

Package Exports

  • has-passive-events

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (has-passive-events) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

has-passive-events unstable Build Status

Check if event listener options are available on the current device. Try it out.

npm install has-passive-events

const hasPassive = require('has-passive-events')

hasPassive ? element.addEventListener('wheel', handler, {passive: true}) : element.addEventListener('wheel', handler)

If you find edge case, please address issues.