- From: Brian Burg <bburg@apple.com>
- Date: Mon, 08 Aug 2016 14:20:44 -0700
- To: Andreas Tolfsen <ato@mozilla.com>
- Cc: public-browser-tools-testing@w3.org
> On Aug 8, 2016, at 9:50 AM, Andreas Tolfsen <ato@mozilla.com> wrote: > > 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. Other reasons to discourage current hack: - It's easy to rebind the shortcuts at the app or OS level. - Other localizations might have different key bindings. - The shortcuts probably don’t work on mobile user agents (AFAIK). > 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. I think we want to leave the old endpoint intact, lest we start re-evaluating the rationality of many other endpoints. Here’s a question: should the endpoint allow some way to hint for tabs vs windows? At the spec level, there is no such difference in browsing contexts, but users seem to care about the difference. I think some browsers behave differently w.r.t. background throttling and playback if a browsing context is an unfocused window vs hidden tab. > 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 21:21:18 UTC