1681-engine / index / onFullscreenChange
Function: onFullscreenChange() ​
ts
function onFullscreenChange(fn, doc?): () => void;Defined in: src/platform/fullscreen.ts:82
Calls fn(isFullscreen) whenever the page enters or leaves fullscreen — by the game or by the player pressing Esc, which no game code sees otherwise. Returns the unsubscribe.
Parameters ​
| Parameter | Type |
|---|---|
fn | (fullscreen) => void |
doc | FullscreenDocument | null |
Returns ​
() => void