Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Window object support for multi-screen devices #8217

Open
michaelwasserman opened this issue Aug 24, 2022 · 4 comments
Open

Window object support for multi-screen devices #8217

michaelwasserman opened this issue Aug 24, 2022 · 4 comments

Comments

@michaelwasserman
Copy link

The Multi-Screen Window Placement spec suggests enhancements for supporting multi-screen devices. I would greatly appreciate feedback and help regarding integrating some of that work in the HTML spec. Here are some pertinent high-level proposals in the spec:

  1. Extend the Window object with a Window.getScreenDetails() method and ScreenDetails and ScreenDetailed interfaces to supply multi-screen information.
  2. Extend the Window.open() steps to support left and top feature definitions relative to a multi-screen origin
  3. Extend both with an internal slot that can be used in lieu of transient activation, to support initiating multi-screen experiences

I invite anyone to discuss this topic in a tentative W3C TPAC 2022 breakout session, and I will file similar issues on CSSOM-View and Fullscreen specs soon. Thank you!

@michaelwasserman
Copy link
Author

@domenic
Copy link
Member

domenic commented Sep 5, 2022

The most relevant issues to the HTML Standard appear to be (2) and (3). (2) seems pretty straightforward. Can you explain (3) in more detail? What was insufficient about the existing transient activation requirement?

@michaelwasserman
Copy link
Author

Sure, (1) may fit better in CSSOM-View with the Screen interface, or its own spec.

Item (3) stems from web application developer requests (e.g. 1, 2) to open and/or fullscreen multiple windows from a single user activation. Our initial proposal permits a window to enter fullscreen and then open a single popup from one user activation, in appropriate circumstances, to satisfy a prominent subset of developer requests.

I'd like to explore how this relates to item 8 in the the rules for choosing a browsing context, invoked by the window open steps. Perhaps our proposal's criteria already satisfies the specified condition ("If the user agent has been configured such that in this instance it will create a new browsing context"), or perhaps this proposal elicits feedback and ideas, which I would love to discuss!

@domenic
Copy link
Member

domenic commented Sep 7, 2022

Right, so those are the correct steps to look at.

The difference between "If the user agent has been configured such that in this instance it will create a new browsing context" and "If the user agent has been configured such that in this instance it will reuse current" is meant to capture browser settings, e.g. http://kb.mozillazine.org/Browser.link.open_newwindow.restriction . (I suspect such settings were much more prominent in browser settings UI's back in the days when this text was originally written...) So it isn't meant as an escape hatch to do any behavior.

Per spec, you are already allowed to open multiple windows from a single user activation, because doing so does not consume user activation, and thus the user activation will continue lasting for the transient activation duration. The same is true for fullscreen. Both only check for the presence of transient user activation, and neither consume user activation. So I don't think any spec updates are needed, and certainly not a new timestamp.

Maybe browsers are more restrictive than the spec though, today? /cc @mustaqahmed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants