-
Notifications
You must be signed in to change notification settings - Fork 25
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
Feature detection support? #9
Comments
As far as 1 goes, I'm not sure there is a feasible way to do that. However, since the default is to clamp the windows onto the monitor the app executing is currently within, would we really need to detect it for any reason? It won't error if it fails, it'll just not show up in the right place. On point 2 for the For point 3, feature detecting a string key/value pair in an option string... No way comes to mind. I'll think about it. Not even sure of a way to propose something for this. Aside from making a new method somewhere which "checks validity" of the string and whether the browser can execute that. Before going through that effort though, I'd love to know the use-case for needing to feature detect that. Looks like all of this would need new API surfaces to be reliable and open to expansion for future changes in other specs too. The idea of exposing known dictionaries as for point 2 is extremely promising IMO. |
There's still some validity to this question, but I think the API generally adds a sufficient level of feature-detection support, given the preexisting landscape.
Beyond that, sites can estimate supported coordinates from the multi-screen available bounds exposed by the API. Browsers will generally clamp bounds to be within the work area of a specific display, but this implementer-specific behavior. It should be noted that some Window Managers may not support coordinate-based placements, see #68; we might want to consider ways to notify sites whether coordinate-based placement is possible. We may wish to improve documentation about these topics. |
This came up in w3ctag/design-reviews#767 For practical purposes, sites can feature-detect the capability to place content on specific screens via access to those screens in the ScreenDetails interface, but must consider other factors. Sites face uncertainty about popup blocking and feature detection. Window.open()’s steps invoke the rules for choosing a navigable, wherein step 8 requires (but does not consume?) transient activation iff So sites can check a some popup prerequisites (navigator.userActivation.isActive, screen bounds, etc.), but not whether the user agent is configured to show popups, nor how windowFeatures will be interpreted or adjusted (e.g. when a Relatedly, sites can check a subset of Element.requestFullscreen() prerequisites (e.g. transient activation, target screen validity), but additional feature-detection support might be warranted. Perhaps most confusing are the nuances of how window management requests might be constrained or have ancillary effects, given platform, user-agent, and circumstantial conditions that factor into each request. For example, Element.requestFullscreen() might make other displays blank on macOS when “Displays have separate spaces” is explicitly disabled, or using window.open() to show a popup might cause the opener or a related window to exit fullscreen, or the popup request might open as a tab if the opener’s window was made fullscreen without use of HTML APIs. I support adding feature-detection for window.open() (or even replacing window.open with a more modern interface), but it seems fairly complex given the legacy of this API. Here are some strawperson ideas that might support transient activation requirements, potential delegated capabilities, and more condition-specific capabilities like being able to open a popup without a transient user activation after requesting fullscreen on a target screen of a multi-screen device): |
Q: How can we let developers detect support for various new Window Placement features?
Suggestions are welcome; this may be difficult to achieve without adding new API surfaces.
The text was updated successfully, but these errors were encountered: