diff --git a/index.bs b/index.bs index ffd83c05..c4b0dadd 100644 --- a/index.bs +++ b/index.bs @@ -119,6 +119,7 @@ spec: HTML; urlPrefix: https://html.spec.whatwg.org/multipage/ text: set up a window environment settings object; url: window-object.html#set-up-a-window-environment-settings-object text: set up a worker environment settings object; url: workers.html#set-up-a-worker-environment-settings-object text: set up a worklet environment settings object; url: worklets.html#set-up-a-worklet-environment-settings-object + text: window open steps; url: multipage/window-object.html#window-open-steps text: worker event loop; url: webappapis.html#worker-event-loop-2 text: worklet global scopes; url: worklets.html#concept-document-worklet-global-scopes @@ -1929,6 +1930,7 @@ navigation status struct, which has the following items:
BrowsingContextCommand = ( + BrowsingContextCreateCommand // BrowsingContextGetTreeCommand // BrowsingContextNavigateCommand // BrowsingContextReloadCommand @@ -1940,6 +1942,7 @@ BrowsingContextCommand = (BrowsingContextResult = ( + BrowsingContextCreateResult // BrowsingContextGetTreeResult // BrowsingContextNavigateResult ) @@ -2193,6 +2196,75 @@ To get the navigation info, given |context| and |navigation status|: ### Commands ### {#module-browsingContext-commands} +#### The browsingContext.create Command #### {#command-browsingContext-create} + +The browsingContext.create command creates a new +[=/browsing context=], either in a new tab or in a new window, and returns its +[=browsing context id=]. + +
+ BrowsingContextCreateCommand = { + method: "browsingContext.create", + params: BrowsingContextCreateParameters + } + + BrowsingContextCreateType = "tab" / "window" + + BrowsingContextCreateParameters = { + type: BrowsingContextCreateType + } ++
+ BrowsingContextCreateResult = { + context: BrowsingContext + } ++
type
field of
+ |command parameters|.
+
+
+ 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
". This must be
+ done without invoking the [=/focusing steps=] for the created browsing
+ context. If |type| is "tab
", and the implementation supports
+ multiple browsing contexts in the same OS window, the new browsing context
+ should share an OS window with any other [=top-level browsing context=]. If
+ |type| is "window
", and the implementation supports multiple
+ browsing contexts in separate OS windows, the created browsing context
+ should be in a new OS window. In all other cases the details of how the
+ browsing context is presented to the user are implementation defined.
+
+ Issue: HTML's [=window open steps=] depend on the "entry global object"
+ and WebDriver's New
+ Window command depends on the "current browsing context". Given that we
+ don't have any such implicit context here, what OS window should new tabs
+ be opened in?
+
+ 1. Let |context id| be the [=browsing context id=] of the newly created
+ [=/browsing context=].
+
+ 1. Let |body| be a [=map=] matching the BrowsingContextCreateResult
+ production, with the context
field set to |context id|.
+
+ 1. Return [=success=] with data |body|.
+
+parent
field of
+1. Let |parent id| be the value of the parent
field of
|command parameters| if present, or null otherwise.
1. Let |max depth| be the value of the maxDepth
field of |command