diff --git a/index.bs b/index.bs index b72fbd650..c5e123120 100644 --- a/index.bs +++ b/index.bs @@ -1222,8 +1222,14 @@ Issue: Define how this works. # User Contexts # {#user-contexts} A user context represents a collection of top-level navigables within a remote -end. Each top-level navigable belongs to exactly one user contexts, and child -navigables belong to the same user context as their parent. +end. Each top-level navigable belongs to exactly one user context, and child +navigables belong to the same user context as their parent. A [=user context=] without +navigables belonging to it is an empty user context. + +The remote end always contains one [=user context=] referred as the default user +context. + +Issue: Should we have a default user context? Each user context represents an additional [=storage key=], so that no storage state is shared between different user contexts. @@ -1856,6 +1862,16 @@ The browser.createUserContext command creates a [
browser.createUserContextResult
production with the userContext
+ field set to |user context|'s [=user context id=].
+
+1. Return [=success=] with data |result|.
+
- browser.closeUserContextResult = { - userContext: browser.UserContext - } -+
+ EmptyResult +
browsingContext.Info
production with the context
field set to |context id|, the parent
field set to |parent id|
if |is root| is true
, or unset otherwise, the url
- field set to |url|, and the children
field set to |child infos|.
+ field set to |url|, the userContext
field set to |user context| and the children
field set to |child infos|.
1. Return |context info|.
@@ -2755,13 +2774,20 @@ The [=remote end steps=] with |command parameters| are:
1. If the implementation is unable to create a new browsing context for any
reason then return [=error=] with [=error code=] [=unsupported operation=].
+ 1. Let |user context| be the [=default user context=].
+
+ 1. If |command parameters|[userContext
] is present and is not null:
+
+ 1. Let |user context| be the result of [=trying=] to find a [=user context=] whose [=user context id=] equals |command parameters|[userContext
].
+
1. Create a new [=top-level browsing context=] by running the [=window open
- steps=] with url set to "about:blank
",
- target set to the empty string, and
- features set to "noopener
". Which OS window the new [=/browsing context=]
- is created in depends on |type| and |reference context|:
+ steps=] in the |user context| with url set to
+ "about:blank
", target set to the empty
+ string, and features set to "noopener
".
+ Which OS window the new [=/browsing context=] is created in depends on
+ |type| and |reference context|:
* If |type| is "tab
" and the implementation supports
multiple browsing contexts in the same OS window: