/
index.md
44 lines (30 loc) · 1.07 KB
/
index.md
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
---
title: "WindowControlsOverlay: visible property"
short-title: visible
slug: Web/API/WindowControlsOverlay/visible
page-type: web-api-instance-property
status:
- experimental
browser-compat: api.WindowControlsOverlay.visible
---
{{APIRef("Window Controls Overlay API")}}{{SeeCompatTable}}
The **`visible`** read-only property of the {{domxref("WindowControlsOverlay")}} interface returns a {{Glossary("Boolean")}} that indicates whether the window controls overlay is visible or not.
The window controls overlay is not be visible if:
- The Web App Manifest's [`display_override`](/en-US/docs/Web/Manifest/display_override) member is not set to `window-controls-overlay`.
- Or, if the user has opted-out of the feature.
## Value
A boolean.
## Examples
```js
if (navigator.windowControlsOverlay.visible) {
// Execute code if the controls overlay is visible.
} else {
// Do something else when it isn't visible.
}
```
## Specifications
{{Specifications}}
## Browser compatibility
{{Compat}}
## See also
- The {{domxref("WindowControlsOverlay")}} interface it belongs to.