-
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
Should screens.currentScreen be [SameObject] ? #49
Comments
This may be relevant for the definition of when
That makes sense if the enumeration changes, but if |
My informal reading of "currentScreen changes" is that it means that currentScreen.id has changed. In other words, that the page has been moved to another screen. |
Yes, currentScreen should be [SameObject], so currentScreen.change should fire when properties of that screen change and when the window moves from one screen to another (which can be detected by changes to currentScreen.id). Screens.change should only fire when a screen is added or removed from the screens array; it does not need to fire when a window moves between screens, and we should not need a separate EventHandler for that. I'll update the explainer soon. |
Reopening this issue; @quisquous discovered some complications with making currentScreen [SameObject]. |
Coming back to this, I think making these objects Say you have two screens, display 0 and display 1 in But...what happens to the old I think the options really are: (1) Don't make (2) Mark I think I am inclined to go with the first option based on the |
* remove [SameObject] (see: w3c#49) * split Screens.onchange into Screens.onscreenschange/oncurrentscreenchange
* remove [SameObject] (see: #49) * split Screens.onchange into Screens.onscreenschange/oncurrentscreenchange
I think the current approach (not [SameObject]) makes sense for the reasons @quisquous explored above. |
* remove [SameObject] (see: w3c#49) * split Screens.onchange into Screens.onscreenschange/oncurrentscreenchange
Over in https://drafts.csswg.org/cssom-view/#dom-window-screen
This
[SameObject]
annotation indicates that even as the properties of the screen changes (e.g. via system changes, or the window being moved to a different display) the sameScreen
object is always returned, and updated live.Should the same be true for the
ScreenAdvanced
object returned byScreens.currentScreen
? i.e. does it update live, with itsid
etc changing dynamically? Or does the object itself swap out?I assume it should be
[SameObject]
but wanted to confirmThe text was updated successfully, but these errors were encountered: