We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a03e13 commit e92d104Copy full SHA for e92d104
src/helpers/helpers.dom.ts
@@ -262,8 +262,10 @@ export const supportsEventListenerOptions = (function() {
262
}
263
} as EventListenerOptions;
264
265
- window.addEventListener('test', null, options);
266
- window.removeEventListener('test', null, options);
+ if (_isDomSupported()) {
+ window.addEventListener('test', null, options);
267
+ window.removeEventListener('test', null, options);
268
+ }
269
} catch (e) {
270
// continue regardless of error
271
0 commit comments