blob: ff16ac6bc9fbd0844d1da1cf59f298b09e6eea6c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
---
title: Window.screen
slug: Web/API/Window/screen
tags:
- API
- CSSOM View
- DOM
- Fenêtre
- Propriété
- Vue CSSOM
- Écran
translation_of: Web/API/Window/screen
---
<div>{{APIRef("CSSOM View")}}</div>
<div>Retourne une référence à l'objet <code style="font-style: normal; line-height: 1.5;">screen</code> associé à la fenêtre. L'object <code style="font-style: normal; line-height: 1.5;">screen</code>, qui implémente l'interface <span style="line-height: 1.5;">{{domxref("Screen")}}, est un objet spécial servant à examiner les propriétés de l'écran qui affiche la fenêtre courante.</span></div>
<h2 id="Syntax" name="Syntax">Syntaxe</h2>
<pre class="syntaxbox"><var>objetEcran</var> = <var>window</var>.screen;
</pre>
<h2 id="Example" name="Example">Examples</h2>
<pre class="brush:js">if (screen.pixelDepth < 8) {
// utiliser la page en colorisation réduite
} else {
// utiliser la page en coolorisation normale
}
</pre>
<h2 id="Specification" name="Specification">Spécifications</h2>
<table class="standard-table">
<thead>
<tr>
<th scope="col">Spécification</th>
<th scope="col">État</th>
<th scope="col">Commentaires</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{SpecName('CSSOM View', '#dom-window-screen', 'window.screen')}}</td>
<td>{{Spec2('CSSOM View')}}</td>
<td> </td>
</tr>
</tbody>
</table>
<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2>
<p>{{Compat("api.Window.screen")}}</p>
|