WakeLockSentinel: release() method

Baseline 2025
Newly available

Since March 2025, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

The release() method of the WakeLockSentinel interface releases the WakeLockSentinel, returning a Promise that is resolved once the sentinel has been successfully released.

Syntax

js
release()

Parameters

None.

Return value

Returns a Promise that resolves with undefined.

Exceptions

No exceptions are thrown. You should always listen for the release event to check if a wake lock has been released.

Examples

In this example, when a user clicks a button the WakeLockSentinel is released.

js
wakeLockOffButton.addEventListener("click", () => {
  WakeLockSentinel.release();
});

Specifications

Specification
Screen Wake Lock API
# the-release-method

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
release
Chrome – Full support
Chrome 84 (Release date: 2020-07-27)
footnote Full support
Edge – Full support
Edge 84 (Release date: 2020-07-16)
footnote Full support
Firefox – Full support
Firefox 126 (Release date: 2024-05-14)
footnote Full support
Opera – Full support
Opera 70 (Release date: 2020-07-27)
footnote Full support
Safari – Full support
Safari 16.4 (Release date: 2023-03-27)
footnote Full support
Chrome Android – Full support
Chrome Android 84 (Release date: 2020-07-27)
footnote Full support
Firefox for Android – Full support
Firefox for Android 126 (Release date: 2024-05-14)
footnote Full support
Opera Android – Full support
Opera Android 60 (Release date: 2020-09-23)
footnote Full support
Safari on iOS – Partial support
Safari on iOS 16.4 – 18.3 (Release date: 2023-03-27)
footnote Partial support
footnote Does not work in standalone Home Screen Web Apps. See bug 254545.
Safari on iOS – Full support
Safari on iOS 18.4 (Release date: 2025-03-31)
footnote Full support
Samsung Internet – Full support
Samsung Internet 14 (Release date: 2021-04-17)
footnote Full support
WebView Android – Full support
WebView Android 84 (Release date: 2020-07-27)
footnote Full support
WebView on iOS – Partial support
WebView on iOS 16.4 – 18.3 (Release date: 2023-03-27)
footnote Partial support
footnote Does not work in standalone Home Screen Web Apps. See bug 254545.
WebView on iOS – Full support
WebView on iOS 18.4 (Release date: 2025-03-31)
footnote Full support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Partial support
Partial support
Has more compatibility info.

See also