idle
ユーザーのシステムがアイドル状態、ロックされた状態、アクティブな状態であるのを発見します。
この API を使うには "idle" パーミッションが必要です。
型
idle.IdleState
-
端末のアイドル状態を記す文字列
関数
idle.queryState()
-
システムがロックされたら
"locked"
を、ユーザーが指定した時間の間に何も入力しない場合は"idle"
を、その他では"active"
を返す。 idle.setDetectionInterval()
-
idle.onStateChanged
イベントでシステムがアイドル状態であると決定する間隔をセットします。
イベント
idle.onStateChanged
-
システム状態が変化したら発火します。
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | ||||||
---|---|---|---|---|---|---|---|
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.
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.
メモ:
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.