screen-wake-lock
Permissions-Policy Media

Overview

The screen-wake-lock directive controls the Screen Wake Lock API's navigator.wakeLock.request('screen'), which keeps the screen from dimming or locking automatically. Its default allowlist is self, and it is used for recipe, navigation, and presentation screens.

Details

`screen-wake-lock=(self)` limits it to the document's own origin, `screen-wake-lock=()` blocks it entirely, and `screen-wake-lock=(self "https://present.example.com")` delegates to a named origin. An iframe needs `allow="screen-wake-lock"`. When the policy denies it, the Promise returned by navigator.wakeLock.request('screen') rejects with a NotAllowedError.

A wake lock is held only while the document is visible; when the tab goes to the background it is released automatically and must be re-requested when the tab becomes active again. Keeping the screen on drains the battery, so delegate it minimally and only where it benefits the user. It works only in a secure context and replaces the legacy Feature-Policy feature.

Syntax

Permissions-Policy: screen-wake-lock=(self)

Notes

Related directives