UseRequestFullscreen
katanakit-js / useRequestFullscreen
Function: useRequestFullscreen()
Section titled “Function: useRequestFullscreen()”function useRequestFullscreen(target?): Promise<void>;Defined in: infrastructure/viewport/viewport.service.ts:285
Requests fullscreen on the given element (or the document root).
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
target? |
HTMLElement |
The element to make fullscreen (defaults to document.documentElement). |
Returns
Section titled “Returns”Promise<void>
Throws
Section titled “Throws”If fullscreen is not supported.
Example
Section titled “Example”await useRequestFullscreen(videoElement);