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
Reuse existing Screen interface or add something new? #18
Comments
We looked at your above list and believe that
Going with the new API you should file a CSSOM View issues to ask them to deprecate the main screen object, and then cut its properties down to just what is necessary for web compat |
I'm going to transfer this issue to the newly-consolidated window-placement repo, which now proposes a new ScreenInfo dictionary shaped similar to the existing Screen interface, and will plan to act on your guidance, thanks! |
I commented on a related CSSOM View issue that I filed earlier; hopefully that's a good start to gather feedback, but I'm happy to file a separate issue as needed. |
Adding a per-screen interface that follows the existing live-object Screen pattern offers developers a familiar workflow and allows synchronous access to the latest screen information in change event listeners. The API offering additional per-screen information currently inherits from the existing Screen interface, so that all window.screen attributes are also available on the corresponding new API surfaces. This seems like a reasonable pattern for now, but inheritance can probably be changed later as needed, so long as we are thoughtful about changes to the exposed attributes of each interface. Feel free to reopen this issue if there's any new feedback to consider. |
This issue concerns the interface offered by objects returned from getScreens(). The explainer currently proposes reusing the existing
Screen
interface, but it may actually be better to add a new parallel interface or data structure. Some additional thoughts are discussed in the explainer's compatibility section.Some reasons to re-use the existing interface:
Some reasons to add a new parallel interface/structure:
[1] It might then be useful to expose a matching
id
on window.screen for comparison with objects returned by getScreens().Thanks to @domenic for highlighting the difficulties/inability to successfully compare static snapshots and live objects, and for suggesting that a new dictionary might suffice instead of a new interface.
Please share your thoughts, thanks!
The text was updated successfully, but these errors were encountered: