WakeLockSentinel.release()

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

安全なコンテキスト用: この機能は一部またはすべての対応しているブラウザーにおいて、安全なコンテキスト (HTTPS) でのみ利用できます。

release()WakeLockSentinel インターフェイスのメソッドで、 WakeLockSentinel を返し、この見張り (sentinel) の解放に成功したら解決する Promise を返します。

構文

js
WakeLockSentinel.release().then(...);

引数

なし。

返値

undefined で解決する Promise を返します。

例外

例外は発生しません。起動ロックが解放されたかどうかを確認するには release イベントを待ち受けしてください。

この例では、ユーザーがボタンをクリックすると WakeLockSentinel が解放されます。

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

仕様書

Specification
Screen Wake Lock API
# the-release-method

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
release

Legend

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

Full support
Full support
Partial support
Partial support

関連情報