From 074785cea106179cb3305637055ab0a009ca74f2 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:52 -0500 Subject: initial commit --- .../api/document/visibilitychange_event/index.html | 148 +++++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 files/pt-pt/web/api/document/visibilitychange_event/index.html (limited to 'files/pt-pt/web/api/document/visibilitychange_event/index.html') diff --git a/files/pt-pt/web/api/document/visibilitychange_event/index.html b/files/pt-pt/web/api/document/visibilitychange_event/index.html new file mode 100644 index 0000000000..02df020b70 --- /dev/null +++ b/files/pt-pt/web/api/document/visibilitychange_event/index.html @@ -0,0 +1,148 @@ +--- +title: visibilitychange +slug: Web/API/Document/visibilitychange_event +translation_of: Web/API/Document/visibilitychange_event +--- +

O evento visibilitychange é ativado quando o conteúdo de um separador se torna visível ou foi ocultado.

+ +

Informação geral

+ +
+
Especificação
+
{{SpecName("Page Visibility API")}}
+
Interface
+
{{domxref("event")}}
+
Bubbles
+
Sim
+
Cancelável
+
Não
+
Destino
+
{{domxref("Document")}}
+
Ação Predefinida
+
 
+
None
+
+ +

Propriedades

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropriedadeTipoDescrição
target {{readonlyInline}}{{domxref("EventTarget")}}The event target (the topmost target in the DOM tree).
type {{readonlyInline}}{{domxref("DOMString")}}The type of event.
bubbles {{readonlyInline}}{{jsxref("Boolean")}}Whether the event normally bubbles or not.
cancelable {{readonlyInline}}{{jsxref("Boolean")}}Whether the event is cancellable or not.
+ +

Exemplo

+ +
document.addEventListener("visibilitychange", function() {
+  console.log( document.visibilityState );
+});
+
+ +

Especificações

+ + + + + + + + + + + + + + + + +
EspecificaçãoEstadoComentário
{{SpecName('Page Visibility API','#sec-visibilitychange-event','visibilitychange')}}{{Spec2('Page Visibility API')}} 
+ +

Compatibilidade de navegador

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
FuncionalidadeChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Suporte básico13 {{property_prefix("webkit")}}
+ 33
{{CompatGeckoDesktop(10)}} {{property_prefix("moz")}}
+ {{CompatGeckoDesktop(18)}}
10 +

12.10[1]

+
6.1
+
+ +
+ + + + + + + + + + + + + + + + + + + +
FuncionalidadeAndroidFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
Suporte básico4.4 {{property_prefix("webkit")}}{{CompatGeckoMobile(10)}} {{property_prefix("moz")}}
+ {{CompatGeckoMobile(18)}}
{{CompatUnknown}}12.10 [1]7
+
+ +

[1] Doesn't fire the visibilitychange event when the browser window is minimized, nor set hidden to true.

+ +

Consultar também

+ + -- cgit v1.2.3-54-g00ecf