Skip to content

Content script clarifications#16579

Merged
rebloor merged 5 commits intomdn:mainfrom
rebloor:content-script-clarifications
May 26, 2022
Merged

Content script clarifications#16579
rebloor merged 5 commits intomdn:mainfrom
rebloor:content-script-clarifications

Conversation

@rebloor
Copy link
Copy Markdown
Contributor

@rebloor rebloor commented May 23, 2022

Summary

Clarifications of content script behavior in Manifest V2 and V3

Metadata

This PR…

  • Adds a new document
  • Rewrites (or significantly expands) a document
  • Fixes a typo, bug, or other error

@rebloor rebloor added the Content:WebExt WebExtensions docs label May 23, 2022
@rebloor rebloor requested a review from Rob--W May 23, 2022 02:39
@rebloor rebloor requested review from a team as code owners May 23, 2022 02:39
@rebloor rebloor requested review from dipikabh and removed request for a team May 23, 2022 02:39
@github-actions github-actions bot added the Content:Other Any docs not covered by another "Content:" label label May 23, 2022
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented May 23, 2022

Preview URLs

Flaws

Note! 1 document with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Mozilla/Firefox/Releases/101
Title: Firefox 101 for developers
on GitHub
Flaw count: 4

  • broken_links:
    • Can't resolve https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/manifest.json/action
    • Can't resolve https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/manifest.json/browser_action
    • Can't resolve https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/manifest.json/background
    • Can't resolve https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/manifest.json/host_permissions

External URLs

URL: /en-US/docs/Mozilla/Add-ons/WebExtensions/Content_scripts
Title: Content scripts
on GitHub


URL: /en-US/docs/Mozilla/Firefox/Releases/101
Title: Firefox 101 for developers
on GitHub

No new external URLs

(this comment was updated 2022-05-24 22:29:50.232310)


Content scripts get the same cross-domain privileges as the rest of the extension: so if the extension has requested cross-domain access for a domain using the [`permissions`](/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/permissions) key in `manifest.json`, then its content scripts get access that domain as well.

> **Note:** From Firefox 101, content scripts can perform cross-origin requests when the destination server opts in using [CORS](/en-US/docs/Web/HTTP/CORS); however, host permissions don't work in content scripts, but they still do in regular extension pages.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is tied to MV3, not a Firefox version.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

Comment thread files/en-us/mozilla/firefox/releases/101/index.md Outdated
Comment thread files/en-us/mozilla/firefox/releases/101/index.md Outdated
Comment thread files/en-us/mozilla/add-ons/webextensions/content_scripts/index.md Outdated
Co-authored-by: Rob Wu <rob@robwu.nl>
@rebloor rebloor requested a review from Rob--W May 24, 2022 22:21
Comment thread files/en-us/mozilla/add-ons/webextensions/content_scripts/index.md Outdated
Comment thread files/en-us/mozilla/firefox/releases/101/index.md Outdated
Copy link
Copy Markdown
Member

@Rob--W Rob--W left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks as usual Richard!

@rebloor rebloor merged commit ce7f155 into mdn:main May 26, 2022
@rebloor rebloor deleted the content-script-clarifications branch May 26, 2022 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:Other Any docs not covered by another "Content:" label Content:WebExt WebExtensions docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants