Module fullscreen
The Fullscreen API (src/page/fullscreen.odin): an element fills the screen. The page keeps one fullscreen element per document (an <iframe>'s container is the fullscreen element of its parent while its document is), the shell makes the window fill the screen and hides the browser's interface. "fullscreenchange" and "fullscreenerror" are plain events (bubbling, composed) fired at the element, or at the document when the element left the tree.
Exposed to: Window. Source: api/fullscreen.widl.
Odin: import "wren:fullscreen".
Types
enum FullscreenNavigation : i32
FullscreenOptions.navigationUI: whether the browser's interface (address bar, tabs) may be shown over the page.
| member | value | |
|---|---|---|
Auto | 0 | |
Show | 1 | |
Hide | 2 |
Functions
Element_requestFullscreen
Promise Element_requestFullscreen(Element element, FullscreenNavigation navigationUI)element.requestFullscreen(options): settled once the window is in full screen. Rejected with TypeError when the element cannot go (not connected, not an element that may, the document is not allowed by the permissions policy or has no recent click or key press, the tab is not shown, full screen is turned off); "fullscreenerror" is fired too.
Host: Element_requestFullscreen :: proc(c: ^Call, element: Api_Element, navigationUI: Api_FullscreenNavigation) -> u64
Document_exitFullscreen
Promise Document_exitFullscreen()document.exitFullscreen(): settled once the window is back. Rejected with TypeError when the document has no fullscreen element.
Host: Document_exitFullscreen :: proc(c: ^Call) -> u64
Document_fullscreenElement
Element Document_fullscreenElement()document.fullscreenElement: the fullscreen element, retargeted against the document; null when there is none.
Host: Document_fullscreenElement :: proc(c: ^Call) -> u64
ShadowRoot_fullscreenElement
Element ShadowRoot_fullscreenElement(Node root)shadowRoot.fullscreenElement: the fullscreen element retargeted against the root (null when not in its tree).
Host: ShadowRoot_fullscreenElement :: proc(c: ^Call, root: Api_Node) -> u64
Document_fullscreenEnabled
bool Document_fullscreenEnabled()document.fullscreenEnabled: the document may request full screen (turned on, permissions policy "fullscreen").
Host: Document_fullscreenEnabled :: proc(c: ^Call) -> bool
Document_fullscreen
bool Document_fullscreen()document.fullscreen (legacy): the document has a fullscreen element.
Host: Document_fullscreen :: proc(c: ^Call) -> bool