userScripts.ExecutionWorld
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
MAIN
world 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, unlikeISOLATED
worlds of content scripts. SeveralUSER_SCRIPT
worlds can exist when scripts are registered withworldId
.userScripts.configureWorld()
is used to change the configuration of aUSER_SCRIPT
world.
Browser compatibility
BCD tables only load in the browser