diff options
Diffstat (limited to 'files/fr/web/api/document/visibilitystate/index.html')
-rw-r--r-- | files/fr/web/api/document/visibilitystate/index.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/files/fr/web/api/document/visibilitystate/index.html b/files/fr/web/api/document/visibilitystate/index.html index 2ff5dcc883..d8ea3d1139 100644 --- a/files/fr/web/api/document/visibilitystate/index.html +++ b/files/fr/web/api/document/visibilitystate/index.html @@ -30,10 +30,10 @@ translation_of: Web/API/Document/visibilityState <h2 id="Exemples">Exemples</h2> -<pre class="brush:js; line-numbers language-js"><code class="language-js">document<span class="punctuation token">.</span><span class="function token">addEventListener</span><span class="punctuation token">(</span><span class="string token">"visibilitychange"</span><span class="punctuation token">,</span> <span class="keyword token">function</span><span class="punctuation token">(</span><span class="punctuation token">)</span> <span class="punctuation token">{</span> - console<span class="punctuation token">.</span><span class="function token">log</span><span class="punctuation token">(</span> document<span class="punctuation token">.</span>visibilityState <span class="punctuation token">)</span><span class="punctuation token">; - // Modifier le comportement...</span> -<span class="punctuation token">}</span><span class="punctuation token">)</span><span class="punctuation token">;</span></code></pre> +<pre class="brush:js">document.addEventListener("visibilitychange", function() { + console.log( document.visibilityState ); + // Modifier le comportement... +});</pre> <h2 id="Spécifications">Spécifications</h2> |