organism-react-scroll-nav
Version:
A React scroll spy library with flux
15 lines • 445 B
JavaScript
var testForPassiveScroll = function testForPassiveScroll() {
var win = window;
var supportsPassiveOption = false;
try {
var opts = Object.defineProperty({}, "passive", {
get: function get() {
supportsPassiveOption = true;
}
});
win.addEventListener("test", null, opts);
win.removeEventListener("test", null, opts);
} catch (e) {}
return supportsPassiveOption;
};
export default testForPassiveScroll;