Docs for support for execution-world MAIN#34466
Merged
Conversation
Contributor
|
Preview URLs
Flaws (1)Note! 3 documents with no flaws that don't need to be listed. 🎉 URL:
External URLs (1)URL:
(comment last updated: 2024-07-02 22:15:24) |
rebloor
commented
Jun 28, 2024
Contributor
|
This pull request has merge conflicts that must be resolved before it can be merged. |
Rob--W
requested changes
Jul 1, 2024
| <p> | ||
| <strong>Warning:</strong> Due to the lack of isolation, the web page can detect and interfere with the executed code. | ||
| Do not use the <code>MAIN</code> world unless it is acceptable for web pages to read, access, or modify the logic or data that flows through the executed code. | ||
| <code>world</code>, and therefore <code>"MAIN"</code>, is not supported in Firefox (although it is planned, and the work to introduce it is tracked by <a href="https://bugzil.la/1736575" class="external" target="_blank">Bug 1736575</a>). In the meantime, JavaScript code running in the isolated content script sandbox can use the Firefox "Xray vision" feature, as described in <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Sharing_objects_with_page_scripts">Share objects with page scripts</a>. |
Member
There was a problem hiding this comment.
Above id="run_at" shoud be changed to id="world".
| - `runAt` {{optional_inline}} | ||
| - : Same as `run_at` in the [`content_scripts`](/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/content_scripts) key. | ||
| - `world` {{optional_inline}} | ||
| - : {{WebExtAPIRef("contentScripts.ExecutionWorld")}}. The execution environment for a script to execute in. |
Member
There was a problem hiding this comment.
Link to the content_scripts manifest key instead, like all other properties here already do.
| @@ -0,0 +1,35 @@ | |||
| --- | |||
| title: contentScripts.ExecutionWorld | |||
Member
There was a problem hiding this comment.
Drop this article. The API doesn't expose this type.
Rob--W
approved these changes
Jul 2, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Documentation in support of Bug 1736575 Support execution world MAIN in
scripting.executeScript()and content_scripts including:scripting.ExecutionWorldscripting.ExecutionWorldand theworldproperty tocontentScripts.register()Related issues and pull requests
Related BCD changes in mdn/browser-compat-data#23539