Skip to content

Commit

Permalink
draft browser.closeUserContext
Browse files Browse the repository at this point in the history
  • Loading branch information
OrKoN committed Oct 30, 2023
1 parent 4b94218 commit 9eb17f0
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1838,7 +1838,7 @@ The <dfn export for=commands>browser.createUserContext</dfn> command creates a [
<dt>Command Type</dt>
<dd>
<pre class="cddl remote-cddl">
browser.Close = (
browser.CreateUserContext = (
method: "browser.createUserContext",
params: EmptyParams,
)
Expand Down Expand Up @@ -1866,7 +1866,7 @@ The <dfn export for=commands>browser.closeUserContext</dfn> command closes a use
<dt>Command Type</dt>
<dd>
<pre class="cddl remote-cddl">
browser.Close = (
browser.CloseUserContext = (
method: "browser.closeUserContext",
params: {
userContext: browser.UserContext
Expand All @@ -1886,6 +1886,24 @@ The <dfn export for=commands>browser.closeUserContext</dfn> command closes a use

<div algorithm="remote end steps for browser.closeUserContext">

The [=remote end steps=] with |command parameters| are:

1. Let |user context| be the result of [=trying=] to find a [=user context=]
whose [=user context id=] equals |command
parameters|["<code>userContext</code>"].

Issue: Do we need to define "find" to be able to combine it with [=trying=]?

Issue: Should we allow closing the default context?

1. [=Close=] any [=top-level browsing contexts=] contained that belong to the
|user context| without [=prompting to unload=].

Note: This implicitly only affects browsing contexts that were under
automation in the first place.

1. Return [=success=] with data null.

</div>

#### The browser.getUserContexts Command #### {#command-browser-getUserContexts}
Expand All @@ -1896,7 +1914,7 @@ The <dfn export for=commands>browser.getUserContexts</dfn> command returns a lis
<dt>Command Type</dt>
<dd>
<pre class="cddl remote-cddl">
browser.Close = (
browser.GetUserContexts = (
method: "browser.getUserContexts",
params: EmptyParams,
)
Expand Down

0 comments on commit 9eb17f0

Please sign in to comment.