Apparently it's possible for a window to be in no screen, while still not being minimized, so the return type of Window.screen should probably be Screen | undefined I guess.
To reproduce:
Get the cursor close to the top edge of a window, so that the cursor turns into the vertical resize arrows.
Drag horizontally, to initiate a drag of the window.
Drag the window as far bottom as possible.
If done correctly the window will be out of bounds of screen, and calling .screen () on it will return you undefined back.
I suppose a window can also be positioned out of the bounds of the screen via the APIs?
Alternatively it may be interesting if this was automatically normalized so that the closest screen were returned, if that makes sense 🤔
Apparently it's possible for a window to be in no screen, while still not being minimized, so the return type of
Window.screen
should probably beScreen | undefined
I guess.To reproduce:
.screen ()
on it will return youundefined
back.I suppose a window can also be positioned out of the bounds of the screen via the APIs?
Alternatively it may be interesting if this was automatically normalized so that the closest screen were returned, if that makes sense 🤔