mode
How the window takes up the screen. Setting it switches between a normal window and borderless fullscreen on the display that holds the window.
Reading it returns the window's current state, which the platform may change later than the assignment: on macOS the switch to fullscreen animates for about half a second, and the user can leave fullscreen with the window's own controls. Each change of size arrives as a resize event once it has happened.
Throws
if the platform refuses the switch.