Skip to content

Commit 2671565

Browse files
authored
Merge pull request cubiq#1121 from cubiq/passiveChrome
fix isPassive function
2 parents 72bdb89 + 975bf52 commit 2671565

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

demos/demoUtils.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
// https://github.com/WICG/EventListenerOptions/pull/30
1+
// ref https://github.com/WICG/EventListenerOptions/pull/30
22
function isPassive() {
3-
var supportsCaptureOption = false;
3+
var supportsPassiveOption = false;
44
try {
5-
addEventListener("test", null, Object.defineProperty({}, 'capture', {
5+
addEventListener("test", null, Object.defineProperty({}, 'passive', {
66
get: function () {
7-
supportsCaptureOption = true;
7+
supportsPassiveOption = true;
88
}
99
}));
1010
} catch(e) {}
11-
return supportsCaptureOption;
11+
return supportsPassiveOption;
1212
}
1313

0 commit comments

Comments
 (0)