From 61734598002fa81fa1d6d0949f5536ccfdfaba5e Mon Sep 17 00:00:00 2001 From: Oliver Dunk Date: Mon, 10 Aug 2026 14:18:04 +0000 Subject: [PATCH] Define Browser interface Defines the Browser interface so that it can be referenced from other specifications which define WebExtension APIs. Also, update heading levels for other content to correctly create table of contents. --- specification/window.browser.bs | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/specification/window.browser.bs b/specification/window.browser.bs index 52621cb0a..d2ef00e7b 100644 --- a/specification/window.browser.bs +++ b/specification/window.browser.bs @@ -42,11 +42,23 @@ spec: html; urlPrefix: https://html.spec.whatwg.org/multipage/ and are left up to User Agent implementation. +
+

{{Browser}}

+ +
+    [Exposed=(Window,Worker), LegacyNoInterfaceObject]
+    interface Browser {
+      // Intentionally left blank.
+    };
+  
+ + Note: This interface is intentionally left blank to allow APIs to be exposed by other specifications. +
-

+

window.browser API -

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

+

Worker API -

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