mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-19 20:51:14 +02:00
Harden addEventListener
scriptlet
This commit is contained in:
parent
c7ddb2501b
commit
3ee3275dc1
1 changed files with 7 additions and 1 deletions
|
@ -882,7 +882,13 @@ function addEventListenerDefuser(
|
|||
}
|
||||
if ( matchesBoth ) { return; }
|
||||
return Reflect.apply(target, thisArg, args);
|
||||
}
|
||||
},
|
||||
get(target, prop, receiver) {
|
||||
if ( prop === 'toString' ) {
|
||||
return target.toString.bind(target);
|
||||
}
|
||||
return Reflect.get(target, prop, receiver);
|
||||
},
|
||||
};
|
||||
self.EventTarget.prototype.addEventListener = new Proxy(
|
||||
self.EventTarget.prototype.addEventListener,
|
||||
|
|
Loading…
Reference in a new issue