-
Notifications
You must be signed in to change notification settings - Fork 22.5k
/
index.md
39 lines (25 loc) · 1.32 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
---
title: "Permissions-Policy: screen-wake-lock"
slug: Web/HTTP/Headers/Permissions-Policy/screen-wake-lock
page-type: http-permissions-policy-directive
browser-compat: http.headers.Permissions-Policy.screen-wake-lock
---
{{HTTPSidebar}}
The HTTP {{HTTPHeader("Permissions-Policy")}} header **`screen-wake-lock`** directive controls whether the current document is allowed to use [Screen Wake Lock API](/en-US/docs/Web/API/Screen_Wake_Lock_API) to indicate that the device should not dim or turn off the screen.
Specifically, where a defined policy blocks use of this feature, {{domxref("WakeLock.request()")}} calls will return a {{jsxref("Promise")}} that rejects with a {{domxref("DOMException")}} of type `NotAllowedError`.
## Syntax
```http
Permissions-Policy: screen-wake-lock=<allowlist>;
```
- `<allowlist>`
- : A list of origins for which permission is granted to use the feature. See [`Permissions-Policy` > Syntax](/en-US/docs/Web/HTTP/Headers/Permissions-Policy#syntax) for more details.
## Default policy
The default allowlist for `screen-wake-lock` is `self`.
## Specifications
{{Specifications}}
## Browser compatibility
{{Compat}}
## See also
- [Screen Wake Lock API](/en-US/docs/Web/API/Screen_Wake_Lock_API)
- {{HTTPHeader('Permissions-Policy')}} header
- [Permissions Policy](/en-US/docs/Web/HTTP/Permissions_Policy)