Skip to content

KBE3D / KBCore / Cesium / Fullscreen

Fullscreen

Browser-independent functions for working with the standard fullscreen API.

函数

函数描述
supportsFullscreenDetects whether the browser supports the standard fullscreen API.
requestFullscreenAsynchronously requests the browser to enter fullscreen mode on the given element. If fullscreen mode is not supported by the browser, does nothing.
exitFullscreenAsynchronously exits fullscreen mode. If the browser is not currently in fullscreen, or if fullscreen mode is not supported by the browser, does nothing.

变量

变量描述
elementThe element that is currently fullscreen, if any. To simply check if the browser is in fullscreen mode or not, use Fullscreen#fullscreen.
changeEventNameThe name of the event on the document that is fired when fullscreen is entered or exited. This event name is intended for use with addEventListener. In your event handler, to determine if the browser is in fullscreen mode or not, use Fullscreen#fullscreen.
errorEventNameThe name of the event that is fired when a fullscreen error occurs. This event name is intended for use with addEventListener.
enabledDetermine whether the browser will allow an element to be made fullscreen, or not. For example, by default, iframes cannot go fullscreen unless the containing page adds an "allowfullscreen" attribute (or prefixed equivalent).
fullscreenDetermines if the browser is currently in fullscreen mode.

KBE3D @3.0.0 Copyright © 2024-present KBE3D