Skip to content

docs(webextensions): document cross-browser MV3 background fallback#44108

Open
danyalahmed1995 wants to merge 7 commits into
mdn:mainfrom
danyalahmed1995:docs/webextensions-mv3-background-fallback
Open

docs(webextensions): document cross-browser MV3 background fallback#44108
danyalahmed1995 wants to merge 7 commits into
mdn:mainfrom
danyalahmed1995:docs/webextensions-mv3-background-fallback

Conversation

@danyalahmed1995
Copy link
Copy Markdown
Contributor

Summary

Adds a focused section to the WebExtensions background manifest documentation explaining how a Manifest V3 extension can specify both background.scripts and background.service_worker for cross-browser background behavior.

The update also clarifies that background.preferred_environment is not required for the basic fallback behavior, and should only be used when an extension specifically wants to prefer a service worker where available.

Fixes #44100.

Validation

  • npx --yes prettier@3.8.3 --check "files/en-us/mozilla/add-ons/webextensions/manifest.json/background/index.md"
  • npx --yes --package markdownlint-cli2@0.22.1 --package markdownlint-rule-search-replace@1.2.0 markdownlint-cli2 "files/en-us/mozilla/add-ons/webextensions/manifest.json/background/index.md"
  • git diff --check

@danyalahmed1995 danyalahmed1995 requested a review from a team as a code owner May 13, 2026 13:41
@danyalahmed1995 danyalahmed1995 requested review from rebloor and removed request for a team May 13, 2026 13:41
@github-actions github-actions Bot added Content:WebExt WebExtensions docs size/s [PR only] 6-50 LoC changed labels May 13, 2026
Comment thread files/en-us/mozilla/add-ons/webextensions/manifest.json/background/index.md Outdated
Comment thread files/en-us/mozilla/add-ons/webextensions/manifest.json/background/index.md Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 13, 2026

Preview URLs (1 page)

(comment last updated: 2026-05-25 17:49:53)

@danyalahmed1995 danyalahmed1995 requested a review from Rob--W May 13, 2026 17:57
Comment thread files/en-us/mozilla/add-ons/webextensions/manifest.json/background/index.md Outdated
Comment thread files/en-us/mozilla/add-ons/webextensions/manifest.json/background/index.md Outdated
danyalahmed1995 and others added 2 commits May 14, 2026 04:08
…ound/index.md

Co-authored-by: rebloor <git@sherpa.co.nz>
…ound/index.md

Co-authored-by: rebloor <git@sherpa.co.nz>
@danyalahmed1995 danyalahmed1995 requested review from Rob--W and rebloor May 14, 2026 08:14
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.

This PR is changing the example for the worse. The original example was designed to be minimal yet easily observable. The update changes metadata unnecessarily and changes the obvious behavior to a log, which is not as easily discoverable.

@danyalahmed1995
Copy link
Copy Markdown
Contributor Author

@Rob--W Yeah my bad you are right.I restored the original observable example behavior and metadata, and kept the update limited to the wording changes from the earlier review.

Copy link
Copy Markdown
Contributor

@rebloor rebloor left a comment

Choose a reason for hiding this comment

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

Thanks for making the text changes

Comment thread files/en-us/mozilla/add-ons/webextensions/manifest.json/background/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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:WebExt WebExtensions docs size/s [PR only] 6-50 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add script-on-click example and related content

4 participants