Trevixal API
    Preparing search index...

    Function createFullscreenToggle

    • A fullscreen toggle: the target covers the window, and the Fullscreen API takes the page to the whole screen underneath it.

      The page goes fullscreen rather than the target, because the browser draws nothing outside the fullscreen element, and the palette, the slash menu and every dialog are appended to <body>: with the target itself fullscreen, each of them would open where it cannot be seen.

      requestFullscreen rejects whenever the call is not tied to a user gesture, and is missing outright in some embedded views and in test environments, so the rejection is treated as a normal outcome, not an error: the target still covers the window, and a hint says how to leave, which the browser only says for its own fullscreen. Escape leaves on either route.

      Parameters

      Returns FullscreenToggle