-
Notifications
You must be signed in to change notification settings - Fork 82
create specification for self.browser #508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
74784f2
create specification for window.browser
patrickkettner ffcf572
feedback from PR for window.browser
patrickkettner 9abc5e6
Update specification/window.browser.bs
patrickkettner 77cbbf0
Update specification/window.browser.bs
patrickkettner 0c97892
update metadata in spec
patrickkettner 35f8f21
add browser to worker scopes
patrickkettner 2a84e05
Update specification/window.browser.bs
patrickkettner 3679214
Update specification/window.browser.bs
patrickkettner a41e4cd
Update specification/window.browser.bs
patrickkettner 9ca1dd0
Update specification/window.browser.bs
patrickkettner 87d00fe
Update specification/window.browser.bs
patrickkettner e442b0f
Update specification/window.browser.bs
patrickkettner 3952d20
removed unused code
patrickkettner 2dd59f1
update version
patrickkettner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| <pre class="metadata"> | ||
| Title: window.browser | ||
| Shortname: wecg-browser | ||
| Level: 1 | ||
| Group: wecg | ||
| Status: UD | ||
| URL: https://w3c.github.io/webextensions/specification/window.browser.html | ||
| Editor: Patrick Kettner, Google, patrickkettner@google.com | ||
| Abstract: This specification reserves the <code>window.browser</code> namespace for use by WebExtensions. | ||
| Repository: w3c/webextensions | ||
| Complain About: accidental-2119 on, missing-example-ids on | ||
| </pre> | ||
|
|
||
| <pre class=link-defaults> | ||
| spec:html; type:attribute; text:window | ||
| </pre> | ||
|
|
||
| <pre class="anchors"> | ||
| spec: html; urlPrefix: https://html.spec.whatwg.org/multipage/ | ||
| type: dfn; text: valid non-empty URL; url: valid-non-empty-url-potentially-surrounded-by-spaces | ||
| </pre> | ||
|
|
||
| <section class="non-normative"> | ||
| ## Introduction | ||
| <em>This section is non-normative.</em> | ||
|
|
||
| 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 | ||
| <code>chrome</code> namespace. When WebExtensions were adopted outside of | ||
| Chromium, other vendors used the more neutral <code>browser</code> namespace. | ||
| That <code>browser</code> 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 <code>window.browser</code> as reserved for | ||
| the use of APIs designed to interact with WebExtensions. The specifics of what | ||
| APIs within <code>window.browser</code> are at present intentionally undefined, | ||
| and are left up to User Agent implementation. | ||
| </section> | ||
|
|
||
|
|
||
| <section> | ||
| <h3 id="window-interface"> | ||
| <a attribute lt="browser"><code>window.browser</code></a> API | ||
| </h3> | ||
|
|
||
| {{browser}} is UA defined attribute exposed on {{window}}. When implemented, | ||
| it MUST be used only for WebExtension related functionality. | ||
| </section> | ||
|
|
||
|
|
||
| <pre class="idl"> | ||
| partial interface Window { | ||
| attribute object browser; | ||
|
oliverdunk marked this conversation as resolved.
|
||
| }; | ||
|
|
||
| </pre> | ||
|
|
||
| <section> | ||
| <h3 id="worker-interface"> | ||
| Worker API | ||
| </h3> | ||
|
|
||
| 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. | ||
| </section> | ||
|
|
||
| <pre class="idl"> | ||
| partial interface ServiceWorkerGlobalScope { | ||
| attribute object browser; | ||
| }; | ||
| </pre> | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.