-
Notifications
You must be signed in to change notification settings - Fork 22.4k
/
index.md
32 lines (22 loc) · 931 Bytes
/
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
---
title: "Navigator: wakeLock property"
short-title: wakeLock
slug: Web/API/Navigator/wakeLock
page-type: web-api-instance-property
browser-compat: api.Navigator.wakeLock
---
{{ApiRef("Screen Wake Lock API")}}{{securecontext_header}}
The **`wakeLock`** read-only property of the {{domxref("Navigator")}} interface returns a {{DOMxRef("WakeLock")}} interface that allows a document to acquire a screen wake lock.
While a screen wake lock is active, the user agent will try to prevent the device from dimming the screen, turning it off completely, or showing a screensaver.
## Syntax
```js-nolint
navigator.wakeLock
```
## Specifications
{{Specifications}}
## Browser compatibility
{{Compat}}
## See also
- {{DOMxRef("WakeLock.request()")}}
- [Screen Wake Lock API](/en-US/docs/Web/API/Screen_Wake_Lock_API)
- [Stay awake with the Screen Wake Lock API](https://developer.chrome.com/docs/capabilities/web-apis/wake-lock/)