Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions specification/window.browser.bs
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,23 @@ spec: html; urlPrefix: https://html.spec.whatwg.org/multipage/
and are left up to User Agent implementation.
</section>

<section>
<h2 id="browser-interface">{{Browser}}</h2>

<pre class="idl">
[Exposed=(Window,Worker), LegacyNoInterfaceObject]
interface Browser {
// Intentionally left blank.
};
</pre>

Note: This interface is intentionally left blank to allow APIs to be exposed by other specifications.
</section>

<section>
<h3 id="window-interface">
<h2 id="window-interface">
<a attribute lt="browser"><code>window.browser</code></a> API
</h3>
</h2>

{{browser}} is UA defined attribute exposed on {{window}}. When implemented,
it MUST be used only for WebExtension related functionality.
Expand Down Expand Up @@ -89,15 +101,15 @@ spec: html; urlPrefix: https://html.spec.whatwg.org/multipage/

<pre class="idl">
partial interface Window {
attribute object browser;
attribute Browser browser;
};

</pre>

<section>
<h3 id="worker-interface">
<h2 id="worker-interface">
Worker API
</h3>
</h2>

When {{browser}} is defined on {{window}}, it SHOULD also be exposed on {{ServiceWorkerGlobalScope}}
of origins associated with WebExtensions.
Expand All @@ -106,6 +118,6 @@ spec: html; urlPrefix: https://html.spec.whatwg.org/multipage/

<pre class="idl">
partial interface ServiceWorkerGlobalScope {
attribute object browser;
attribute Browser browser;
};
</pre>
Loading