1 | // Test via a getter in the options object to see if the passive property is accessed
|
2 | var supportsPassive = false;
|
3 |
|
4 | try {
|
5 | var opts = Object.defineProperty({}, 'passive', {
|
6 | get: function get() {
|
7 | supportsPassive = true;
|
8 | }
|
9 | });
|
10 | window.addEventListener('testPassive', null, opts);
|
11 | window.removeEventListener('testPassive', null, opts);
|
12 | } catch (e) {}
|
13 |
|
14 | export default supportsPassive; |
\ | No newline at end of file |