1681-engine / index / enterFullscreen
Function: enterFullscreen() ​
ts
function enterFullscreen(element?, doc?): Promise<boolean>;Defined in: src/platform/fullscreen.ts:45
Puts element (default the whole page) in fullscreen; resolves true once it is. Browsers allow it only inside a user gesture, so call it from a click or key handler. A refusal resolves false instead of throwing: a game's fullscreen button should never take the frame down with it.
Parameters ​
| Parameter | Type |
|---|---|
element? | Element |
doc? | FullscreenDocument | null |
Returns ​
Promise<boolean>