jobiqo-cl
Version:
[](https://circleci.com/gh/jobiqo/jobiqo-cl)
20 lines (18 loc) • 540 B
JavaScript
var passiveSupported = false;
if (typeof window !== 'undefined') {
try {
var options = Object.defineProperty({}, 'passive', {
get: function () {
passiveSupported = true;
return true;
}
});
window.addEventListener('test', options, options);
window.removeEventListener('test', options, options);
}
catch (err) {
passiveSupported = false;
}
}
var nonPassive = passiveSupported ? { passive: false } : false;
export { nonPassive };