Initial commit
This commit is contained in:
19
node_modules/react-remove-scroll/dist/es2019/aggresiveCapture.js
generated
vendored
Normal file
19
node_modules/react-remove-scroll/dist/es2019/aggresiveCapture.js
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
let passiveSupported = false;
|
||||
if (typeof window !== 'undefined') {
|
||||
try {
|
||||
const options = Object.defineProperty({}, 'passive', {
|
||||
get() {
|
||||
passiveSupported = true;
|
||||
return true;
|
||||
},
|
||||
});
|
||||
// @ts-ignore
|
||||
window.addEventListener('test', options, options);
|
||||
// @ts-ignore
|
||||
window.removeEventListener('test', options, options);
|
||||
}
|
||||
catch (err) {
|
||||
passiveSupported = false;
|
||||
}
|
||||
}
|
||||
export const nonPassive = passiveSupported ? { passive: false } : false;
|
||||
Reference in New Issue
Block a user