W3C home > Mailing lists > Public > public-browser-tools-testing@w3.org > July to September 2016

Proposal for New Window command

From: Andreas Tolfsen <ato@mozilla.com>
Date: Mon, 8 Aug 2016 17:50:55 +0100
To: public-browser-tools-testing@w3.org
Message-Id: <20160808175055.c8e0c61aaed3399a99589cdd@mozilla.com>
Hi everyone,

One of the most common misuses of the actions API is to trigger the
creation of new top-level browsing contexts (whether tabs or windows).

For the convenience of our users I would suggest introducing a new
command for spawning a new top-level browsing context, which does not
have the problems associated with existing approaches commonly found in
WebDriver literature:

(A) Same-origin and security leak issues commonly experienced with
window.open() described in
https://mathiasbynens.github.io/rel-noopener/. [1]

(B) Control/Command + T or Control/Command + N, which is not only
limited to specific platforms and device types but also crosses over
into the native automation realm, as platform keyboard input was never
meant to have effects on the anything outside the document.

This could be implemented as a POST to /session/{session id}/window/new
as POST /session/{session id}/window is occupied by Switch To Window,
or we could switch them around.  It would return the window handle
of the new window, and would be guaranteed blocking, unlike other
techniques mentioned above.

1. I should add the definition of window.open() on MDN is also
inaccurate, as it _is not_ the same as creating a new window through
File → New window.
Received on Monday, 8 August 2016 19:39:36 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:09:54 UTC