Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend browsingContext.close params with promptUnload #518

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2470,7 +2470,8 @@ The <dfn export for=commands>browsingContext.close</dfn> command closes a
}

browsingContext.CloseParameters = {
context: browsingContext.BrowsingContext
context: browsingContext.BrowsingContext,
? promptUnload: bool .default false
}
</pre>
</dd>
Expand All @@ -2489,6 +2490,9 @@ The [=remote end steps=] with |command parameters| are:
1. Let |context id| be the value of the <code>context</code> field of
|command parameters|.

1. Let |prompt unload| be the value of the <code>promptUnload</code> field of
|command parameters|.
juliandescottes marked this conversation as resolved.
Show resolved Hide resolved

1. Let |context| be the result of [=trying=] to [=get a browsing context=]
with |context id|.

Expand All @@ -2497,7 +2501,13 @@ The [=remote end steps=] with |command parameters| are:
1. If |context| is not a [=top-level browsing context=], return [=error=] with
[=error code=] [=invalid argument=].

1. [=Close=] |context|.
1. If |prompt unload| is true:

1. [=Close=] |context|.

1. Otherwise:

1. [=Close=] |context| without [=prompting to unload=].

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

Expand Down