mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
Improve trusted-override-element-method scriptlet
As discussed with filter list maintainers: https://github.com/uBlockOrigin/uBlock-discussions/discussions/933
This commit is contained in:
parent
b98a8d5c02
commit
9e946ce0c3
1 changed files with 2 additions and 1 deletions
|
|
@ -3472,6 +3472,7 @@ function trustedOverrideElementMethod(
|
|||
if ( methodPath === '' ) { return; }
|
||||
const safe = safeSelf();
|
||||
const logPrefix = safe.makeLogPrefix('trusted-override-element-method', methodPath, selector, disposition);
|
||||
const extraArgs = safe.getExtraArgs(Array.from(arguments), 3);
|
||||
proxyApplyFn(methodPath, function(context) {
|
||||
let override = selector === '';
|
||||
if ( override === false ) {
|
||||
|
|
@ -3492,7 +3493,7 @@ function trustedOverrideElementMethod(
|
|||
if ( disposition === 'throw' ) {
|
||||
throw new ReferenceError();
|
||||
}
|
||||
return validateConstantFn(false, disposition);
|
||||
return validateConstantFn(true, disposition, extraArgs);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue