mirror of
https://github.com/gorhill/uBlock.git
synced 2024-10-04 08:37:11 +02:00
Harden addEventListener
scriptlet
This commit is contained in:
parent
c7ddb2501b
commit
3ee3275dc1
@ -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 New Issue
Block a user