From 5ec00959f2f0710d2d95a71adbe891786a2c6cf7 Mon Sep 17 00:00:00 2001 From: Patrick Kettner Date: Tue, 26 Dec 2023 14:05:54 -0500 Subject: [PATCH 1/2] update bikeshed build to support multiple bikeshed files --- .github/workflows/deploy.yml | 9 +++- index.bs => specification/index.bs | 0 specification/window.browser.bs | 80 ++++++++++++++++++++++++++++++ 3 files changed, 88 insertions(+), 1 deletion(-) rename index.bs => specification/index.bs (100%) create mode 100644 specification/window.browser.bs diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index af9f2718..d0c2259b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -25,6 +25,12 @@ jobs: # The type of runner that the job will run on runs-on: ubuntu-20.04 + strategy: + matrix: + include: + - source: ./specification/index.bs + - source: ./specification/window.browser.bs + # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it @@ -37,4 +43,5 @@ jobs: with: GH_PAGES_BRANCH: gh-pages # Deployment will be available at: https://w3c.github.io/webextensions/specification - DESTINATION: specification/index.html + SOURCE: ${{ matrix.source }} + TOOLCHAIN: 'bikeshed' diff --git a/index.bs b/specification/index.bs similarity index 100% rename from index.bs rename to specification/index.bs diff --git a/specification/window.browser.bs b/specification/window.browser.bs new file mode 100644 index 00000000..2755b85e --- /dev/null +++ b/specification/window.browser.bs @@ -0,0 +1,80 @@ +
+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 window.browser namespace for use by WebExtensions.
+Repository: w3c/webextensions
+Complain About: accidental-2119 on, missing-example-ids on
+
+ + + +
+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
+
+ +
+ ## Introduction {#introduction} + This section is non-normative. + + 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 + Chrome version 3. 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 to canonically correct namespace + for all WebExtension APIs. Some interactions with WebExtensions (such as + external messaging from content scripts 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. +
+ + +
+

+ window.browser API +

+ + {{browser}} is UA defined attribute exposed on {{window}}. When implemented, + it MUST be used only for WebExtension related functionality. +
+ + +
+  partial interface Window {
+   attribute object browser;
+  };
+
+
+ +
+

+ Worker API +

+ + When {{browser}} is defined on {{window}}, it SHOULD also be implemented on {{ServiceWorkerGlobalScope}} and {{DedicatedWorkerGlobalScope}}. + It MUST be used exclusivly for WebExtension purposes, however the contents of each instance of {{browser}} is UA defined. +
+ +
+  partial interface DedicatedWorkerGlobalScope {
+    attribute object browser;
+  };
+
+  partial interface ServiceWorkerGlobalScope {
+    attribute object browser;
+  };
+
From e6f4e209e071c159fa97a151e854f4aabace4760 Mon Sep 17 00:00:00 2001 From: Patrick Kettner Date: Mon, 29 Jan 2024 09:19:58 -0500 Subject: [PATCH 2/2] update window.browser spec --- specification/window.browser.bs | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/specification/window.browser.bs b/specification/window.browser.bs index 2755b85e..3dbbe9b8 100644 --- a/specification/window.browser.bs +++ b/specification/window.browser.bs @@ -21,19 +21,19 @@ spec: html; urlPrefix: https://html.spec.whatwg.org/multipage/
- ## Introduction {#introduction} + ## Introduction This section is non-normative. 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 - Chrome version 3. In that system, any API that was added was put under the + 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 to canonically correct namespace + That browser is now considered the canonically correct namespace for all WebExtension APIs. Some interactions with WebExtensions (such as - external messaging from content scripts to background processes) necessitate + 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 @@ -65,15 +65,12 @@ spec: html; urlPrefix: https://html.spec.whatwg.org/multipage/ Worker API - When {{browser}} is defined on {{window}}, it SHOULD also be implemented on {{ServiceWorkerGlobalScope}} and {{DedicatedWorkerGlobalScope}}. - It MUST be used exclusivly for WebExtension purposes, however the contents of each instance of {{browser}} is UA defined. + 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.
-  partial interface DedicatedWorkerGlobalScope {
-    attribute object browser;
-  };
-
   partial interface ServiceWorkerGlobalScope {
     attribute object browser;
   };