Skip to content

Commit 8e08253

Browse files
add bikeshed
1 parent 74784f2 commit 8e08253

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

specification/window.browser.bs

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<pre class="metadata">
2+
Title: window.browser
3+
Shortname: wecg-browser
4+
Level: 1
5+
Group: wecg
6+
Status: UD
7+
URL: https://patrickkettner.github.io/window.browser
8+
Editor: Patrick Kettner, Google, [email protected]
9+
Abstract: This specification reserves the <code>window.browser</code> namespace for use by WebExtensions.
10+
Repository: patrickkettner/window.browser
11+
Complain About: accidental-2119 on, missing-example-ids on
12+
</pre>
13+
14+
<pre class="anchors">
15+
spec: html; urlPrefix: https://html.spec.whatwg.org/multipage/
16+
type: dfn; text: valid non-empty URL; url: valid-non-empty-url-potentially-surrounded-by-spaces
17+
</pre>
18+
19+
<section class="non-normative">
20+
## Introduction
21+
<em>This section is non-normative.</em>
22+
23+
Modern WebExtensions are an evolution of a system originally introduced in
24+
Chrome version 3. In that system, any API that was added was put under the
25+
<code>chrome</code> namespace. When WebExtensions were adopted outside of
26+
Chromium, other vendors used the more neutral <code>browser</code> namespace.
27+
That <code>browser</code> is now considered to canonically correct namespace
28+
for all WebExtension APIs. Some interactions with WebExtensions (such as
29+
external messaging from content scripts to background processes) necessitate
30+
the exposure of this namespace to the web.
31+
32+
Given that, this document defines <code>window.browser</code> as reserved for
33+
the use of APIs designed to interact with WebExtensions. The specifics of what
34+
APIs within <code>window.browser</code> are at present intentionally undefined,
35+
and are left up to User Agent implementation.
36+
</section>
37+
38+
39+
<section>
40+
<h3 id="window-interface">
41+
<a attribute lt="orientation"><code>window.browser</code></a> API
42+
</h3>
43+
44+
{{browser}} is UA defined attribute exposed on {{window}}. When implemented,
45+
it MUST be used only for WebExtension related functionality.
46+
</section>
47+
48+
49+
<pre class="idl">
50+
partial interface Window {
51+
readonly attribute short browser;
52+
};
53+
</pre>

0 commit comments

Comments
 (0)