UNPKG

@glidejs/glide

Version:

Glide.js is a dependency-free JavaScript ES6 slider and carousel. It’s lightweight, flexible and fast. Designed to slide. No less, no more

22 lines (17 loc) 497 B
/** * Test via a getter in the options object to see * if the passive property is accessed. * * @see https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md#feature-detection */ let supportsPassive = false try { let opts = Object.defineProperty({}, 'passive', { get () { supportsPassive = true } }) window.addEventListener('testPassive', null, opts) window.removeEventListener('testPassive', null, opts) } catch (e) {} export default supportsPassive