Use `globalThis` instead of `self` in scriptlet helper

Related discussion:
https://github.com/uBlockOrigin/uBlock-issues/discussions/2768
This commit is contained in:
Raymond Hill 2023-08-25 07:28:50 -04:00
parent 15e6f7990a
commit 2282215e1c
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 1 additions and 0 deletions

View File

@ -45,6 +45,7 @@ function safeSelf() {
if ( scriptletGlobals.has('safeSelf') ) {
return scriptletGlobals.get('safeSelf');
}
const self = globalThis;
const safe = {
'Error': self.Error,
'Object_defineProperty': Object.defineProperty.bind(Object),