From 9a0baddabc763d9c11556a1b368e9982cc78b056 Mon Sep 17 00:00:00 2001 From: Patrick Kettner Date: Tue, 26 Dec 2023 14:05:54 -0500 Subject: [PATCH] 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;
+  };
+