Skip to content
This repository was archived by the owner on Jul 30, 2026. It is now read-only.

Commit ca84691

Browse files
authored
Final README update: Chrome supports browser namespace (#942)
Chrome 152 will support the browser namespace for all extensions without exceptions, following the fix to https://crbug.com/500769389 This means that the polyfill is only going to do anything in older Chrome versions, whose functionality is frozen and not going to change. Therefore, this polyfill does not need any further updates, and developers can choose to phase out its usage once their minimum supported Chrome version is bumped to 152 (or 148 for non-devtools extensions).
1 parent 1a2f11f commit ca84691

1 file changed

Lines changed: 16 additions & 10 deletions

File tree

‎README.md‎

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
# WebExtension `browser` API Polyfill
22

3-
This library allows extensions that use the Promise-based WebExtension/BrowserExt API being standardized by the
4-
[W3 Browser Extensions][w3-browserext] group to run on Google Chrome with minimal or no changes.
3+
This library allows extensions to use the Promise-based `browser` API namespace
4+
to access [WebExtension APIs](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API).
5+
Firefox pioneered this API as an alternative to the callback-based `chrome`
6+
namespace from Chrome, and offered this polyfill to enable Chrome extensions to
7+
use the same API. Safari also supports the `browser` namespace.
58

6-
[![CircleCI](https://circleci.com/gh/mozilla/webextension-polyfill.svg?style=svg)](https://circleci.com/gh/mozilla/webextension-polyfill)
7-
[![codecov](https://codecov.io/gh/mozilla/webextension-polyfill/branch/master/graph/badge.svg)](https://codecov.io/gh/mozilla/webextension-polyfill)
8-
[![devDependency Status](https://david-dm.org/mozilla/webextension-polyfill/dev-status.svg)](https://david-dm.org/mozilla/webextension-polyfill#info=devDependencies)
9-
[![npm version](https://badge.fury.io/js/webextension-polyfill.svg)](https://badge.fury.io/js/webextension-polyfill)
9+
Chrome 148 added support for the `browser` namespace for all extensions except
10+
devtools extensions. This exception [was lifted](https://crbug.com/500769389)
11+
in Chrome 152, which supports the `browser` namespace for all Chrome extensions.
1012

11-
> This library doesn't (and it is not going to) polyfill API methods or options that are missing on Chrome but natively provided
12-
> on Firefox, and so the extension has to do its own "runtime feature detection" in those cases (and then eventually polyfill the
13-
> missing feature on its own or enable/disable some of the features accordingly).
13+
For more information on Chrome's new support for the `browser` namespace, see
14+
https://developer.chrome.com/docs/extensions/develop/concepts/browser-namespace
1415

15-
[w3-browserext]: https://www.w3.org/community/browserext/
16+
**Following the adoption of the `browser` namespace by Chrome, this polyfill
17+
has served its purpose, and will not receive any further updates.**
1618

1719
Table of contents
1820
=================
@@ -37,6 +39,7 @@ Supported Browsers
3739
| Chrome | *Officially Supported* (with automated tests) |
3840
| Firefox | *Officially Supported as a NO-OP* (with automated tests for comparison with the behaviors on Chrome) |
3941
| Opera / Edge (>=79.0.309) | *Unofficially Supported* as a Chrome-compatible target (but not explicitly tested in automation) |
42+
| Safari | *Unofficially Supported as a NO-OP* (but not explicitly tested in automation) |
4043

4144
The polyfill is being tested explicitly (with automated tests that run on every pull request) on **officially supported**
4245
browsers (that are currently the last stable versions of Chrome and Firefox).
@@ -46,6 +49,9 @@ and it does not create any custom wrappers.
4649
Firefox is still included in the automated tests, to ensure that no wrappers are being created when running on Firefox,
4750
and for comparison with the behaviors implemented by the library on Chrome.
4851

52+
On browsers supporting the `browser` namespace, this library acts as a NO-OP.
53+
See the top of this file - in 2027 this library is likely redundant.
54+
4955
## Installation
5056

5157
A new version of the library is built from this repository and released as an npm package.

0 commit comments

Comments
 (0)