idle

ユーザーのシステムがアイドル状態、ロックされた状態、アクティブな状態であるのを発見します。

この API を使うには "idle" パーミッションが必要です。

idle.IdleState

端末のアイドル状態を記す文字列

関数

idle.queryState()

システムがロックされたら "locked" を、ユーザーが指定した時間の間に何も入力しない場合は "idle" を、その他では "active" を返す。

idle.setDetectionInterval()

idle.onStateChanged イベントでシステムがアイドル状態であると決定する間隔をセットします。

イベント

idle.onStateChanged

システム状態が変化したら発火します。

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Firefox for Android
Safari on iOS
idle
IdleState
onStateChanged
onStateChanged.locked
queryState
queryState.locked
setDetectionInterval

Legend

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

Full support
Full support
No support
No support
See implementation notes.

メモ: This API is based on Chromium's chrome.idle API. This documentation is derived from idle.json in the Chromium code.Microsoft Edge compatibility data is supplied by Microsoft Corporation and is included here under the Creative Commons Attribution 3.0 United States License.