scripting.ExecutionWorld

Specifies the execution environment of a script injected with scripting.executeScript() or registered with scripting.registerContentScripts().

Type

Values of this type are strings. Possible values are:

  • ISOLATED

    The default content scripts execution environment. This environment is isolated from the page's context: while they share the same document, the global scopes and available APIs differ.

  • MAIN

    The web page execution environment. This environment is shared with the web page without isolation. Scripts in this environment do not have any access to APIs that are only available to content scripts.

    Warning: Due to the lack of isolation, the web page can detect and interfere with the executed code. Do not use the MAIN world unless it is acceptable for web pages to read, access, or modify the logic or data that flows through the executed code.

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Firefox for Android
Safari on iOS
ExecutionWorld
Chrome – Full support
Chrome 102 (Release date: 2022-05-24)
footnote Full support
Edge – Full support
Edge 102 (Release date: 2022-05-31)
footnote Full support
Firefox – Full support
Firefox 102 (Release date: 2022-06-28)
footnote Full support
Opera – Full support
Opera 88 (Release date: 2022-06-08)
footnote Full support
Safari – Full support
Safari 15.4 (Release date: 2022-03-14)
footnote Full support
Firefox for Android – Full support
Firefox for Android 102 (Release date: 2022-06-28)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15.4 (Release date: 2022-03-14)
footnote Full support
ISOLATED
Chrome – Full support
Chrome 102 (Release date: 2022-05-24)
footnote Full support
Edge – Full support
Edge 102 (Release date: 2022-05-31)
footnote Full support
Firefox – Full support
Firefox 102 (Release date: 2022-06-28)
footnote Full support
Opera – Full support
Opera 88 (Release date: 2022-06-08)
footnote Full support
Safari – Full support
Safari 15.4 (Release date: 2022-03-14)
footnote Full support
Firefox for Android – Full support
Firefox for Android 102 (Release date: 2022-06-28)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15.4 (Release date: 2022-03-14)
footnote Full support
MAIN
Chrome – Full support
Chrome 102 (Release date: 2022-05-24)
footnote Full support
Edge – Full support
Edge 102 (Release date: 2022-05-31)
footnote Full support
Firefox – Full support
Firefox 128 (Release date: 2024-07-09)
footnote Full support
Opera – Full support
Opera 88 (Release date: 2022-06-08)
footnote Full support
Safari – Full support
Safari 15.4 (Release date: 2022-03-14)
footnote Full support
Firefox for Android – Full support
Firefox for Android 128 (Release date: 2024-07-09)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15.4 (Release date: 2022-03-14)
footnote Full support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

Note: This API is based on Chromium's chrome.scripting API.