MCPcopy Create free account
hub / github.com/GraphiteEditor/Graphite / enterFullscreen

Function enterFullscreen

frontend/src/stores/fullscreen.ts:50–63  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

48}
49
50export async function enterFullscreen() {
51 await document.documentElement.requestFullscreen();
52
53 const keyboardLockApiSupported = navigator.keyboard !== undefined && "lock" in navigator.keyboard;
54
55 if (keyboardLockApiSupported && navigator.keyboard) {
56 await navigator.keyboard.lock(["ControlLeft", "ControlRight"]);
57
58 update((state) => {
59 state.keyboardLocked = true;
60 return state;
61 });
62 }
63}
64
65export async function exitFullscreen() {
66 await document.exitFullscreen();

Callers 1

toggleFullscreenFunction · 0.85

Calls 1

lockMethod · 0.80

Tested by

no test coverage detected