From 19d010e41c1a1a8077256ceb19306ac715110b4e Mon Sep 17 00:00:00 2001 From: Alex Rudenko Date: Mon, 30 Oct 2023 11:37:48 +0100 Subject: [PATCH] Rename to UserContext; add a note about User Agents --- index.bs | 56 ++++++++++++++++++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/index.bs b/index.bs index cc1ca396f..c70a05e96 100644 --- a/index.bs +++ b/index.bs @@ -1219,6 +1219,14 @@ access to that data in a {{Window}} global. Issue: Define how this works. +# User Contexts # {#user-contexts} + +A UserContext is an aggregation of browsing contexts that separates the browsing contexts in one user context from browsing contexts in another user context. + +Note: User contexts are a WebDriver BiDi-specific equivalent to private browsing modes (https://www.w3.org/2001/tag/doc/private-browsing-modes/). +While we don't want to pose any restrictions on the implementations of private browsing modes, we want to allow to perform basic operations with private browsing +contexts. A user context can be seen as a user agent in terms of the Infra spec but currently WebDriver BiDi spec is not compliant with that definition of the user agent. + # Modules # {#modules} ## The session Module ## {#module-session} @@ -1812,16 +1820,16 @@ The [=remote end steps=] with |session| and command parameters -#### The browser.createPartition Command #### {#command-browser-createPartition} +#### The browser.createUserContext Command #### {#command-browser-createUserContext} -The browser.createPartition command creates a storage partition for a group of browsing contexts. +The browser.createUserContext command creates a {{UserContext}} of browsing contexts.
Command Type
       browser.Close = (
-        method: "browser.createPartition",
+        method: "browser.createUserContext",
         params: EmptyParams,
       )
       
@@ -1829,29 +1837,29 @@ The browser.createPartition command creates a sto
Return Type
-      browser.createPartitionResult = {
-        partition: browser.Partition
+      browser.createUserContextResult = {
+        userContext: browser.UserContext
       }
     
-
+
-#### The browser.closePartition Command #### {#command-browser-closePartition} +#### The browser.closeUserContext Command #### {#command-browser-closeUserContext} -The browser.closePartition command closes the partition and all browsing contexts in it without running beforeunload handlers. +The browser.closeUserContext command closes the userContext and all browsing contexts in it without running beforeunload handlers.
Command Type
       browser.Close = (
-        method: "browser.closePartition",
+        method: "browser.closeUserContext",
         params: {
-          partition: browser.Partition
+          userContext: browser.UserContext
         },
       )
       
@@ -1859,27 +1867,27 @@ The browser.closePartition command closes the par
Return Type
-      browser.closePartitionResult = {
-        partition: browser.Partition
+      browser.closeUserContextResult = {
+        userContext: browser.UserContext
       }
     
-
+
-#### The browser.getPartitions Command #### {#command-browser-getPartitions} +#### The browser.getUserContexts Command #### {#command-browser-getUserContexts} -The browser.getPartitions command returns a list of existing partitions in the browser instance. +The browser.getUserContexts command returns a list of existing userContexts in the browser instance.
Command Type
       browser.Close = (
-        method: "browser.getPartitions",
+        method: "browser.getUserContexts",
         params: EmptyParams,
       )
       
@@ -1887,18 +1895,18 @@ The browser.getPartitions command returns a list
Return Type
-      browser.PartitionInfo = (
-        partition: browser.Partition,
+      browser.UserContextInfo = (
+        userContext: browser.UserContext,
       )
-      browser.PartitionInfoList = [*browser.PartitionInfo]
-      browser.getPartitionsResult = {
-        partitions: browser.PartitionInfoList
+      browser.UserContextInfoList = [*browser.UserContextInfo]
+      browser.getUserContextsResult = {
+        userContexts: browser.UserContextInfoList
       }
     
-
+
@@ -2013,7 +2021,7 @@ browsingContext.Info = { url: text, children: browsingContext.InfoList / null ? parent: browsingContext.BrowsingContext / null, - ? partition: Browser.Partition / null + ? userContext: Browser.UserContext / null } @@ -2667,7 +2675,7 @@ The browsingContext.create command creates a new type: browsingContext.CreateType, ? referenceContext: browsingContext.BrowsingContext, ? background: bool .default false, - ? partition: Browser.Partition / null + ? userContext: Browser.UserContext / null }