From b9160cd39b652fc29e7603815afabc62aa82a65e Mon Sep 17 00:00:00 2001 From: James Graham Date: Fri, 26 Oct 2018 11:38:12 +0200 Subject: [PATCH] Add a endpoint for creating a new window. This adds an endpoint at /session//window/new that opens a new top-level browsing context. This takes a single parameter "type" that is used as a hint as to the kind of window to create within the application. The return value includes the handle of the new window and the type of the window that was created. --- index.html | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/index.html b/index.html index 45658d214..eda58ef25 100644 --- a/index.html +++ b/index.html @@ -759,6 +759,12 @@

Endpoints

Get Window Handles + + POST + /session/{session id}/window/new + Create Window + + POST /session/{session id}/frame @@ -3230,6 +3236,76 @@

Get Window Handles

+
+

Create Window

+ + + + + + + + + + +
HTTP MethodURI Template
GET/session/{session id}/window/new
+ +

Create a new top-level browsing context. + +

The remote end steps are: + +

    +
  1. If the implementation does not support creating new top-level + browsing contexts, return error with error code + unsupported operation. + +

  2. If the current top-level browsing context is no longer open, + return error with error code no such window. + +

  3. Handle any user prompts and return its value if it is an error. + +

  4. Let type hint be the result of getting the property + "type" from the parameters argument. + +

  5. 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" and + the user agent configured to create a new browing context. This must + be done without invoking the focusing steps for the created browsing + context. If type hint has the value "tab", + and the implementation supports multiple browsing context in the + same OS window, the new browsing context should share an OS window + with the current browsing context. If type hint is + "window", and the implementation supports multiple + browsing contexts in seperate 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. + +

  6. Let handle be the + associated window handle of the newly created window. + +

  7. Let type be "tab" if the newly created + window shares an OS-level window with the current browsing + context, or "window" otherwise. + +

  8. Let result be a new JSON Object initialised with: + +

    +
    "handle" +
    The value of handle. + +
    "type" +
    The value of type. + +
    + +
  9. Return success with data result. +

+ +
+

Switch To Frame

@@ -9384,6 +9460,7 @@

Index

  • Value mode flag
  • Value sanitization algorithm
  • Window object +
  • Window open steps
  • WindowProxy exotic object
  • WorkerNavigator object
  • setSelectionRange