Skip to content

webextension-polyfill updates - #44951

Open
rebloor wants to merge 14 commits into
mdn:mainfrom
rebloor:webextension-polyfill.-updates
Open

webextension-polyfill updates#44951
rebloor wants to merge 14 commits into
mdn:mainfrom
rebloor:webextension-polyfill.-updates

Conversation

@rebloor

@rebloor rebloor commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Description

These changes are designed to emphasize that the webextension-polyfill is now only needed when an extension want to target Chrome 147 or earlier.

Related issues and pull requests

Related changes to the Extension Workshop content in mozilla/extension-workshop#2401.
Fixes #44114 (with content from Issue-44114-Chrome-support-for-the-browser-namespace)

@rebloor
rebloor requested review from Rob--W and bacharakis July 28, 2026 23:22
@rebloor rebloor self-assigned this Jul 28, 2026
@rebloor
rebloor requested a review from a team as a code owner July 28, 2026 23:22
@rebloor rebloor added the Content:WebExt WebExtensions docs label Jul 28, 2026
@github-actions github-actions Bot added the size/s [PR only] 6-50 LoC changed label Jul 28, 2026
@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Preview URLs (5 pages)

External URLs (9)

URL: /en-US/docs/Mozilla/Add-ons/WebExtensions/API
Title: JavaScript APIs


URL: /en-US/docs/Mozilla/Add-ons/WebExtensions/API/proxy
Title: proxy


URL: /en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/executeScript
Title: tabs.executeScript()


URL: /en-US/docs/Mozilla/Add-ons/WebExtensions/Build_a_cross_browser_extension
Title: Build a cross-browser extension

(comment last updated: 2026-08-23 16:39:09)

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

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.

Could you update the text to account for mozilla/webextension-polyfill#942 ? There is a small subset of extensions where "148" does not apply, but "152" does.

@rebloor

rebloor commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

@Rob--W updated re 152

Comment thread files/en-us/mozilla/add-ons/webextensions/api/index.md Outdated
@rebloor
rebloor requested a review from Rob--W August 7, 2026 19:26

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

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.

I think that this might be conflicting with some other PRs, notably #44959 and the older PR at #44149 . In the interest of avoiding duplicate/overlapping work I suggest combining 44149 with this one (this one about 152+148 supersedes the part about 148).

I already approved Oliver's PR, so we could also merge that first, merge/rebase this branch. And then do a final pass for inconsistencies. I spotted at least one inconsistency, the existing claim that devtools doesn't support Promise. That note should be adjusted to state that support was added in 152.

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions github-actions Bot added the merge conflicts 🚧 [PR only] label Aug 9, 2026
@github-actions github-actions Bot removed the merge conflicts 🚧 [PR only] label Aug 9, 2026
Co-authored-by: Rob Wu <rob@robwu.nl>
Co-authored-by: rebloor <git@sherpa.co.nz>
Firefox also supports the `chrome.*` namespace for APIs that are compatible with Chrome, primarily to assist with [porting](https://extensionworkshop.com/documentation/develop/porting-a-google-chrome-extension/). However, using the `browser.*` namespace is preferred. In addition to being the proposed standard, `browser.*` uses promises—a modern and convenient mechanism for handling asynchronous events.

Only in the most trivial extensions is namespace likely to be the only cross-platform issue to be addressed. Therefore, it's rarely, if ever, helpful to address this issue alone. The best approach is to address this with asynchronous event handling.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[mdn-linter] reported by reviewdog 🐶

Suggested change

…he-browser-namespace

Issue 44114 chrome support for the browser namespace
@rebloor

rebloor commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

@Rob--W includes changes from #44149, and I've made updates, so everything should now be accurate and consistent. I'm wondering whether, when we can be reasonably assured that most new cross-browser development will target the versions supporting the browser and promises, we should review the three articles to eliminate any confusion or uncertainty about which one to consult.

@rebloor
rebloor requested a review from Rob--W August 9, 2026 19:18
@github-actions github-actions Bot added the merge conflicts 🚧 [PR only] label Aug 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions github-actions Bot removed the merge conflicts 🚧 [PR only] label Aug 21, 2026

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

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.

@Rob--W includes changes from #44149, and I've made updates, so everything should now be accurate and consistent. I'm wondering whether, when we can be reasonably assured that most new cross-browser development will target the versions supporting the browser and promises, we should review the three articles to eliminate any confusion or uncertainty about which one to consult.

I'd like to preserve a historical reference because that would answer questions "why are there many ways to do the same and which is recommended?". If we can remove some duplication and instead link to a canonical article that would be nice, but let's not add that scope creep to this PR.

Comment thread files/en-us/mozilla/add-ons/webextensions/api/proxy/index.md Outdated

@rebloor rebloor left a comment

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.

Hmm. Chained copy-paste error?

Co-authored-by: Rob Wu <rob@robwu.nl>
Co-authored-by: rebloor <git@sherpa.co.nz>
@rebloor
rebloor requested a review from Rob--W August 23, 2026 16:36
@rebloor

rebloor commented Aug 23, 2026

Copy link
Copy Markdown
Contributor Author

@Rob--W, my comment about reviewing the three articles wasn't so much about removing historical information as about making sure the current situation was as clear as possible across the API, differences, and cross-browser pages. I've made a note to myself to review and create a PR if it looks useful.

@rebloor

rebloor commented Aug 23, 2026

Copy link
Copy Markdown
Contributor Author

@Rob--W ready for your review again

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.

Document Chrome's support for the browser namespace

3 participants