Optionaloptions: WindowOptionsOptionaloptions: WindowOptionsColor drawn behind the canvas, filling any part of the window the canvas does not cover under the current Window.fit.
Whether the title bar and frame are hidden.
The canvas being displayed. Assigning another one swaps what the window shows without reopening it.
ReadonlyclosedWhether Window.close has run.
ReadonlyctxThe drawing context of the canvas page this window is showing.
Pointer shape over the window, using the CSS cursor keywords. An
unrecognized name is ignored and the current cursor kept.
How the canvas is scaled into the window when the two disagree in size or aspect -- see FitStyle. An unrecognized name is ignored.
Whether the window occupies the whole screen.
Height of the window, in points. Non-finite assignments are ignored.
Position of the window's left edge on screen, in points.
Which page of the canvas is on display, numbered from 1. A negative
number counts from the end, and the window resizes its canvas to that
page's dimensions. Assigning a page that does not exist is ignored.
Whether the user may resize the window.
Title-bar text. Assigning null clears it rather than printing "null".
Position of the window's top edge on screen, in points.
Whether the window is mapped on screen. Set false to hide it.
Width of the window, in points. Non-finite assignments are ignored.
Close the window and emit its close event. When the last window
closes, the event loop ends and App.launch's promise resolves.
Queue the window for display. Nothing appears until the event loop starts, which App.launch does -- scheduled automatically on the next tick, so this is usually all a script has to call.
An on-screen window displaying a Canvas, with mouse and keyboard events delivered as they arrive.
A window draws its canvas's current page every frame, so animating means redrawing in a
framehandler rather than pushing images anywhere. Opening one schedules App.launch on the next tick, so a script that creates a window keeps running until every window is closed.🧪 Not in the HTML Canvas standard.