Tankōbon / hooks/use-fullscreen / useFullscreen
Function: useFullscreen()
useFullscreen():
object
Defined in: hooks/use-fullscreen.ts:12
Tracks and toggles the HTML Fullscreen API on the whole document. In Electron this puts the BrowserWindow itself in fullscreen (no IPC needed), and Chromium already exits on Escape, so this hook only has to mirror document.fullscreenElement.
Returns
exit
exit: () =>
void
Leaves fullscreen; does nothing when not in fullscreen.
Returns
void
fullscreen
fullscreen:
boolean
toggle
toggle: () =>
void
Enters fullscreen, or leaves it when already there.
Returns
void