mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-20 01:12:38 +01:00
Use globalThis
instead of self
in scriptlet helper
Related discussion: https://github.com/uBlockOrigin/uBlock-issues/discussions/2768
This commit is contained in:
parent
15e6f7990a
commit
2282215e1c
@ -45,6 +45,7 @@ function safeSelf() {
|
|||||||
if ( scriptletGlobals.has('safeSelf') ) {
|
if ( scriptletGlobals.has('safeSelf') ) {
|
||||||
return scriptletGlobals.get('safeSelf');
|
return scriptletGlobals.get('safeSelf');
|
||||||
}
|
}
|
||||||
|
const self = globalThis;
|
||||||
const safe = {
|
const safe = {
|
||||||
'Error': self.Error,
|
'Error': self.Error,
|
||||||
'Object_defineProperty': Object.defineProperty.bind(Object),
|
'Object_defineProperty': Object.defineProperty.bind(Object),
|
||||||
|
Loading…
Reference in New Issue
Block a user