WakeLockSentinel.released
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
released
は WakeLockSentinel
インターフェイスのプロパティで、 WakeLockSentinel
がまだ解放されていないかどうかを示す論理値を返します。
構文
js
var released = sentinel.released;
値
論理値で、最初は false
であり、 WakeLockSentinel
が解放され(WakeLockSentinel.release()
が呼び出されるか、または自動的にロックが解除され) release
イベントが発行された後は true
となって変化しない値です。
例
この例は、 released
の値が WakeLockSentinel
のライフライクルの中でどのように変化するかを示します。
js
const sentinel = await navigator.wakeLock.request("screen");
console.log(sentinel.released); // "false" と出力
sentinel.onrelease = () => {
console.log(sentinel.released); // "true" と出力
};
await sentinel.release();
仕様書
Specification |
---|
Screen Wake Lock API # dom-wakelocksentinel-released |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
released |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- Partial support
- Partial support
The compatibility table on 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.