idle

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

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

idle.IdleState (en-US)

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

関数

idle.queryState() (en-US)

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

idle.setDetectionInterval() (en-US)

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

イベント

idle.onStateChanged (en-US)

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

ブラウザーの互換性

BCD tables only load in the browser

メモ: 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.