Draft This page is not complete.
The read-only released
property of the WakeLockSentinel
interface returns a boolean that indicates whether a WakeLockSentinel
has been released yet.
Syntax
var released = sentinel.released;
Value
A Boolean
. Its value is false
until the WakeLockSentinel
has been released (either through a call to WakeLockSentinel.release()
or because the lock has been released automatically) and the WakeLockSentinel.onrelease
event has been emitted, after which it becomes true
and no longer changes.
Examples
This example shows how released
's value changes within a WakeLockSentinel
's life cycle.
const sentinel = await navigator.wakeLock.request('screen');
console.log(sentinel.released); // Logs "false"
sentinel.onrelease = () => {
console.log(sentinel.released); // Logs "true"
};
await sentinel.release();
Specifications
Specification | Status | Comment |
Screen Wake Lock APIThe definition of 'released' in that specification. | Editor's Draft | Initial definition. |
Browser compatibility
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Chrome
Full support 87 |
Edge
Full support 87 |
Firefox
No support No |
IE
No support No |
Opera
Full support Yes |
Safari
No support No |
WebView Android
Full support 87 |
Chrome Android
Full support 87 |
Firefox Android
No support No |
Opera Android
Full support Yes |
Safari iOS
No support No |
Samsung Internet Android
No support No |
Legend
- Full support
- Full support
- No support
- No support
- Experimental. Expect behavior to change in the future.'
- Experimental. Expect behavior to change in the future.
WakeLockSentinel.released by Mozilla Contributors is licensed under CC-BY-SA 2.5.