廖井涛
2024-04-24 7e983e4d3b7d7c24e11913075a68a607e61a7d23
north-glass-erp/node_modules/default-passive-events/src/utils.js
New file
@@ -0,0 +1,16 @@
export const eventListenerOptionsSupported = () => {
  let supported = false;
  try {
    const opts = Object.defineProperty({}, 'passive', {
      get() {
        supported = true;
      }
    });
    window.addEventListener('test', null, opts);
    window.removeEventListener('test', null, opts);
  } catch (e) {}
  return supported;
}