Skip to content

Updates about the webextension-polyfill - #2401

Merged
rebloor merged 10 commits into
mozilla:masterfrom
rebloor:webextension-polyfill-updates
Aug 9, 2026
Merged

Updates about the webextension-polyfill#2401
rebloor merged 10 commits into
mozilla:masterfrom
rebloor:webextension-polyfill-updates

Conversation

@rebloor

@rebloor rebloor commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Description

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

Related issues and pull requests

Related changes to MDN content in mdn/content#44951.

Comment thread src/content/documentation/develop.md Outdated
Comment thread src/content/documentation/develop.md Outdated
Comment thread src/content/documentation/develop.md Outdated
Comment thread src/content/documentation/develop/browser-compatibility.md Outdated
Comment thread src/content/documentation/develop/browser-compatibility.md Outdated
### WebExtension browser API Polyfill

When creating extensions you want to work in Firefox and Chrome, this library enables you to use the Firefox Promise-based APIs and have them run on Google Chrome with few, if any, changes.
When creating extensions you want to work in Firefox and Chrome, this library enables you to use the Firefox promise-based APIs and have them run on Google Chrome with few, if any, changes.

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.

Promise-based. I think that your spell checker did not recognize that this was referring to an API name? Or is it the convention to use lower case?

Suggested change
When creating extensions you want to work in Firefox and Chrome, this library enables you to use the Firefox promise-based APIs and have them run on Google Chrome with few, if any, changes.
When creating extensions you want to work in Firefox and Chrome, this library enables you to use the Firefox Promise-based APIs and have them run on Google Chrome with few, if any, changes.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

While I couldn't find a definitive statement, references to the built-in global class or constructor should be capitalized, but references to the concept or instance should be in lowercase, see https://promisesaplus.com/ “promise” is an object or function with a then method whose behavior conforms to this specification.

rebloor and others added 2 commits August 3, 2026 05:35
Co-authored-by: Rob Wu <rob@robwu.nl>
Co-authored-by: rebloor <git@sherpa.co.nz>
Comment thread src/content/documentation/develop.md Outdated
@rebloor
rebloor requested a review from Rob--W August 2, 2026 17:51
Comment thread src/content/documentation/develop/browser-compatibility.md Outdated
Comment thread src/content/documentation/develop/browser-compatibility.md Outdated

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.

Maybe bump this date?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done

- **Namespace**:
- `browser.*`, the standard for the extensions API used by Firefox, Safari, Chrome (from 148), Opera (from 121), and Edge (from 136). Note: `browser.*` [isn't supported for DevTools extensions](https://developer.chrome.com/docs/extensions/develop/concepts/browser-namespace) until Chrome 152, Opera 125, and Edge 140. For support, see the [webextension-polyfill](https://github.com/mozilla/webextension-polyfill).
- `chrome.*` supported by all browsers.
- **Asynchronous APIs**: Promises are used by Firefox and Safari. Chrome, Opera, and Edge began introducing promises with Manifest V3, and they are available for all relevant APIs in Chrome 152.

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 is not really the right framing. The right frame is that Chrome used to not support promises (which is why many extensions and samples may be using callbacks), but that nowadays Chrome does support promises.

Technically you are right that Chrome 152 has completed promise support, but that could also imply that earlier versions did not. That is not the right signal to send. The devtools situation is a special exception.

Please also review the content on the whole page, there are other parts that are now inaccurate.

For namespace, and Promise support specifically, the short version is really "Firefox and Chrome used to have differing capabilities, but now all browsers have the same baseline for namespace and Promise support (that Firefox already supported from the beginning, and Chrome also adopted)".

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Rewritten

rebloor and others added 2 commits August 4, 2026 07:17
Co-authored-by: Rob Wu <rob@robwu.nl>
Co-authored-by: rebloor <git@sherpa.co.nz>

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done

- **Namespace**:
- `browser.*`, the standard for the extensions API used by Firefox, Safari, Chrome (from 148), Opera (from 121), and Edge (from 136). Note: `browser.*` [isn't supported for DevTools extensions](https://developer.chrome.com/docs/extensions/develop/concepts/browser-namespace) until Chrome 152, Opera 125, and Edge 140. For support, see the [webextension-polyfill](https://github.com/mozilla/webextension-polyfill).
- `chrome.*` supported by all browsers.
- **Asynchronous APIs**: Promises are used by Firefox and Safari. Chrome, Opera, and Edge began introducing promises with Manifest V3, and they are available for all relevant APIs in Chrome 152.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Rewritten


All you need to create extensions for Firefox is a [text editor](https://developer.mozilla.org/docs/Learn/Common_questions/Available_text_editors) and [a version of Firefox](/documentation/develop/choosing-a-firefox-version-for-extension-development/) to support your testing. Mozilla and the Firefox extension developer community have also created a number of [extension development tools](/documentation/develop/browser-extension-development-tools/) that can simplify the coding and testing of your extension.

### Chromium-based browser extensions

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@Rob--W not quite sure why GitHub has shown this as a complete deletion and replacement. The only change I've made here is to delete this section, given that we're archiving the tool and it's no longer needed for future future develop future development.

@rebloor
rebloor requested a review from Rob--W August 4, 2026 18:02

@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.

My remaining feedback is trivial to address, so approving with that addressed.

Comment thread src/content/documentation/develop/browser-compatibility.md Outdated
You reference all extensions APIs using a namespace. For example, `browser.alarms.create({delayInMinutes});` creates an alarm that goes off after the time specified in `delayInMinutes`.

There are two API namespaces in use:
From mid-2026, all major browsers support the `browser` namespace and promises for asynchronous methods. Previously, Chromium-based browsers (such as Chrome, Opera, and Microsoft Edge) used only the `chrome` namespace with callbacks.

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 statement suggests that pre mid-2026, Promises were not supported in Chromium. That is inaccurate. If it is awkward to mention it well, I would be okay with separate sections on namespaces and callback/promise behavior, because they have different "timelines".

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@Rob--W I've reworded this, but haven't split out separate sections for namespace and callback/promise. I'll merge if there's no further feedback by the end of Monday

rebloor and others added 2 commits August 8, 2026 06:55
Comment thread src/content/documentation/develop/browser-compatibility.md Outdated
Co-authored-by: Rob Wu <rob@robwu.nl>
@rebloor
rebloor merged commit 55a9fa3 into mozilla:master Aug 9, 2026
5 checks passed
@rebloor
rebloor deleted the webextension-polyfill-updates branch August 9, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants