1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-25 03:43:25 +01:00
uBlock/assets/resources
Raymond Hill 1abc864742
Add trusted-prevent-dom-bypass scriptlet
@description
Prevent the bypassing of uBO scriptlets through anonymous embedded context.

To ensure that a target method in the embedded context is using the
corresponding parent context's method (which is assumed to be
properly patched), or to replace the embedded context with that of the
parent context.

Root issue:
https://issues.chromium.org/issues/40202434

@param methodPath
The method which calls must be intercepted. The arguments
of the intercepted calls are assumed to be HTMLElement, anything else will
be ignored.

@param selector (optional)
A plain CSS selector which will be used in a `document.querySelector()`
call, to validate that the returned element must be processed by the
scriptlet. If no selector is provided, all elements will be processed.

@param targetMethod (optional)
The method in the embedded context which should be delegated to the
parent context. If no method is specified, the embedded context becomes
the parent one, i.e. all  properties of the embedded context will be that
of the parent context.
2024-10-04 12:24:35 -04:00
..
scriptlets.js Add trusted-prevent-dom-bypass scriptlet 2024-10-04 12:24:35 -04:00