tiny-slider
Version:
Vanilla javascript slider for all purposes, inspired by Owl Carousel.
11 lines • 370 B
JavaScript
// Test via a getter in the options object to see if the passive property is accessed
var supportsPassive = false;
try {
var opts = Object.defineProperty({}, 'passive', {
get: function() {
supportsPassive = true;
}
});
window.addEventListener("test", null, opts);
} catch (e) {}
export var passiveOption = supportsPassive ? { passive: true } : false;