Neglected Parking Meter

    are-passive-events-supported
    TypeScript icon, indicating that this package has built-in type declarations

    1.1.1 • Public • Published

    are-passive-events-supported

    Check if the browser supports passive event listeners.

    Example

    import arePassiveEventsSupported from 'are-passive-events-supported'
     
    window.addEventListener(
      'touchstart',
      () => {
        console.log('touchstart')
      },
      arePassiveEventsSupported() ? { passive: true } : undefined,
    )

    Similar projects

    Keywords

    none

    Install

    npm i are-passive-events-supported

    DownloadsWeekly Downloads

    125,636

    Version

    1.1.1

    License

    MIT

    Unpacked Size

    5.05 kB

    Total Files

    8

    Last publish

    Collaborators

    • andarist