diff --git a/index.bs b/index.bs index b14cb2c7d..b8e8a3835 100644 --- a/index.bs +++ b/index.bs @@ -122,6 +122,7 @@ spec: ECMASCRIPT; urlPrefix: https://tc39.es/ecma262/ spec: HTML; urlPrefix: https://html.spec.whatwg.org/multipage/ type: dfn text: a browsing context is discarded; url: window-object.html#a-browsing-context-is-discarded + text: close; url: window-object.html#close-a-browsing-context text: create a classic script; url: webappapis.html#creating-a-classic-script text: create a new browsing context; url: browsers.html#creating-a-new-browsing-context text: default classic script fetch options; url: webappapis.html#default-classic-script-fetch-options @@ -2270,6 +2271,7 @@ navigation status struct, which has the following items:
BrowsingContextCommand = ( + BrowsingContextCloseCommand // BrowsingContextCreateCommand // BrowsingContextGetTreeCommand // BrowsingContextNavigateCommand // @@ -2536,6 +2538,45 @@ To get the navigation info, given |context| and |navigation status|: ### Commands ### {#module-browsingContext-commands} +#### The browsingContext.close Command #### {#command-browsingContext-close} + +The browsingContext.close command closes a +[=top-level browsing context=]. + +
+ BrowsingContextCloseCommand = { + method: "browsingContext.close", + params: BrowsingContextCloseParameters + } + + BrowsingContextCloseParameters = { + context: BrowsingContext + } ++
context
field of
+ |command parameters|.
+
+ 1. Let |context| be the result of [=trying=] to [=get a browsing context=]
+ with |context id|.
+
+ 1. Assert: |context| is not null.
+
+ 1. If |context| is not a [=top-level browsing context=], return [=error=] with
+ [=error code=] [=invalid argument=].
+
+ 1. [=Close=] |context|.
+
+