Browser extensions are programs to extend the capabilities of web browsers.
Although not standardized at first, web browsers have independently implemented a common interoperable set of extension APIs, called WebExtensions.
Modern WebExtensions are an evolution of a system originally introduced in
Chromium. In that system, any API that was added was put under the chrome namespace. When WebExtensions were adopted outside of
Chromium, other vendors used the more neutral browser namespace.
That browser is now considered the canonically correct namespace
for all WebExtension APIs. Some interactions with WebExtensions (such as
external messaging from websites to background processes) necessitate
the exposure of this namespace to the web.
Given that, this document defines window.browser as reserved for
the use of APIs designed to interact with WebExtensions. The specifics of what
APIs within window.browser are at present intentionally undefined,
and are left up to User Agent implementation.
When browser is defined on window, it SHOULD also be exposed on ServiceWorkerGlobalScope of origins associated with WebExtensions.
It MUST be used exclusively for WebExtension purposes, however the contents of each instance of browser is UA defined.
Conformance requirements are expressed
with a combination of descriptive assertions
and RFC 2119 terminology.
The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL”
in the normative parts of this document
are to be interpreted as described in RFC 2119.
However, for readability,
these words do not appear in all uppercase letters in this specification.
All of the text of this specification is normative
except sections explicitly marked as non-normative, examples, and notes. [RFC2119]
Examples in this specification are introduced with the words “for example”
or are set apart from the normative text
with class="example",
like this:
This is an example of an informative example.
Informative notes begin with the word “Note”
and are set apart from the normative text
with class="note",
like this: