blob: 2b66d4a2a088d1d142814b5fea2fc6a497f4af13 (
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
56
|
---
title: Window.scrollbars
slug: Web/API/Window/scrollbars
tags:
- API
- HTML DOM
- Propriété
- Reference
- Window
translation_of: Web/API/Window/scrollbars
---
{{APIRef()}}
La propriété **`Window.scrollbars`** renvoie l'objet `scrollbars`, dont la visibilité peut être vérifié.
## Syntaxe
objRef = window.scrollbars
## Exemple
L'exemple HTML complet suivant montre comment la propriété `visible` de l'objet scrollbars est utilisée.
```html
<!doctype html>
<html>
<head>
<title>Divers Tests DOM</title>
<script>
let visibleScrollbars = window.scrollbars.visible;
</script>
</head>
<body>
<p>Divers Tests DOM</p>
</body>
</html>
```
## Spécifications
| Spécification | Statut | Commentaire |
| -------------------------------------------------------------------------------------------------------------------- | -------------------------------- | ----------- |
| {{SpecName('HTML WHATWG', 'browsers.html#dom-window-scrollbars', 'Window.scrollbars')}} | {{Spec2('HTML WHATWG')}} | |
| {{SpecName('HTML5 W3C', 'browsers.html#dom-window-scrollbars', 'Window.scrollbars')}} | {{Spec2('HTML5 W3C')}} | |
## Compatibilité des navigateurs
{{Compat("api.Window.scrollbars")}}
## Voir également
- {{domxref("window.locationbar")}}
- {{domxref("window.menubar")}}
- {{domxref("window.personalbar")}}
- {{domxref("window.statusbar")}}
- {{domxref("window.toolbar")}}
|