File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -3,4 +3,5 @@ node_modules
3
3
package-lock.json
4
4
test /public /bundle.js
5
5
.idea
6
- dist
6
+ dist
7
+ pnpm-lock.yaml
Original file line number Diff line number Diff line change 26
26
* @see https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md
27
27
*/
28
28
const thirdEventArg = (() => {
29
- let result = false ;
29
+ let supportsPassive = false ;
30
30
31
31
try {
32
- const arg = Object .defineProperty ({}, ' passive' , {
32
+ const opts = Object .defineProperty ({}, ' passive' , {
33
33
get () {
34
- result = { passive: true };
34
+ supportsPassive = { passive: true };
35
35
return true ;
36
36
},
37
37
});
38
38
39
- window .addEventListener (' testpassive' , arg, arg);
40
- window .remove (' testpassive' , arg, arg);
41
- } catch (e) { /* */
39
+ window .addEventListener (' testPassive' , null , opts);
40
+ window .removeEventListener (' testPassive' , null , opts);
41
+ } catch (e) {
42
+ //
42
43
}
43
44
44
- return result ;
45
+ return supportsPassive ;
45
46
})();
46
47
47
48
You can’t perform that action at this time.
0 commit comments