userScripts.ExecutionWorld
The execution environment for a script injected with userScripts.register() or userScripts.update().
The execution environment for a script injected with userScripts.register() or userScripts.update().
Type
Values of this type are a string. Possible values are:
MAIN
The web page execution environment. This environment is shared with the web page without isolation. Scripts in this environment don't have access to the APIs that are only available to content scripts.
[!WARNING] Web pages can detect and interfere with the executed code due to the lack of isolation. Therefore, don't use the
MAINworld unless it's acceptable for web pages to read, access, or modify the logic or data that flows through the executed code.
USER_SCRIPT
The default execution environment for user scripts. This environment is isolated from the page's context and other USER_SCRIPT worlds. Extension APIs are unavailable, unlike ISOLATED worlds of content scripts. Several USER_SCRIPT worlds can exist when scripts are registered with worldId. userScripts.configureWorld() is used to change the configuration of a USER_SCRIPT world.
h2