Document.fullscreen

Deprecated
This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

A propriedade de somente leitura da interface fullscreen retorna se o documento correspondente está mostrando conteúdo em modo de tela cheia (full-screen). 

Apesar dessa propriedade ser de somente leitura, ela não será executa se for modificada (mesmo em modo estrito); o setter não é um operador e não será modificado.

Nota: Desde que esta propriedade foi descontinuada, você pode determinar se o modo full-screen está ativo no documento checando se Document.fullscreenElement não é null.

Síntaxe

var isFullScreen = document.fullscreen;

Valor

Um valor booleano é true se o documento está mostrando um elemento no modo full-screen; se não, o valor é false.

Exemplo

Esta simples função retorna se o modo full-sreen está ativo, usando a obsoleta propriedade fullscreen.

function isDocumentInFullScreenMode() {
  return document.fullscreen;  
}

Neste próximo exemplo, de outra maneira, usa a propriedade atual fullscreenElement para determinar a mesma coisa:

function isDocumentInFullScreenMode() {
  return document.fullscreenElement !== null;
}

Se fullscreenElement  não é null, retorna true, indicando se modo full-screen está sendo usado.

Específicações

Specification Status Comment
Fullscreen API
The definition of 'Document.fullscreen' in that specification.
Padrão em tempo real Definição inicial (como uma proprieda obsoleta).

Compatibilidade de navegadores

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
fullscreen
Deprecated
Chrome Full support 71
Full support 71
Full support 15
Alternate Name
Alternate Name Uses the non-standard name: webkitIsFullscreen
Edge Full support 79
Full support 79
Full support ≤79
Alternate Name
Alternate Name Uses the non-standard name: webkitIsFullscreen
Firefox Full support 64
Full support 64
No support 49 — 65
Disabled
Disabled From version 49 until version 65 (exclusive): this feature is behind the full-screen-api.unprefix.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
No support 9 — 65
Alternate Name
Alternate Name Uses the non-standard name: mozFullScreen
IE No support NoOpera Full support 58
Full support 58
Full support 15
Alternate Name
Alternate Name Uses the non-standard name: webkitIsFullscreen
Safari Full support 6
Alternate Name
Full support 6
Alternate Name
Alternate Name Uses the non-standard name: webkitIsFullScreen
WebView Android Full support 71
Full support 71
Full support ≤37
Alternate Name
Alternate Name Uses the non-standard name: webkitIsFullscreen
Chrome Android Full support 71
Full support 71
Full support 18
Alternate Name
Alternate Name Uses the non-standard name: webkitIsFullscreen
Firefox Android Full support 64
Full support 64
No support 49 — 65
Disabled
Disabled From version 49 until version 65 (exclusive): this feature is behind the full-screen-api.unprefix.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
No support 9 — 65
Alternate Name
Alternate Name Uses the non-standard name: mozFullScreen
Opera Android Full support 50
Full support 50
Full support 14
Alternate Name
Alternate Name Uses the non-standard name: webkitIsFullscreen
Safari iOS Full support 6
Alternate Name
Full support 6
Alternate Name
Alternate Name Uses the non-standard name: webkitIsFullScreen
Samsung Internet Android Full support 10.0
Full support 10.0
Full support 1.0
Alternate Name
Alternate Name Uses the non-standard name: webkitIsFullscreen

Legend

Full support  
Full support
No support  
No support
Deprecated. Not for use in new websites.
Deprecated. Not for use in new websites.
User must explicitly enable this feature.
User must explicitly enable this feature.
Uses a non-standard name.
Uses a non-standard name.

Veja também