idle.setDetectionInterval()

Sets the interval, in seconds, used to determine when the system is in an idle state for idle.onStateChanged events. The default interval is 60 seconds.

The detection interval is specific to the extension that calls the method. Changing the interval in one extension will not affect the detection interval in another extension.

Syntax

js
browser.idle.setDetectionInterval(
  intervalInSeconds // integer
)

Parameters

intervalInSeconds

integer. Threshold, in seconds, used to determine when the system is in an idle state. The minimum value you can supply here is 15.

Examples

js
browser.idle.setDetectionInterval(15);

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Firefox for Android
Safari on iOS
setDetectionInterval
Chrome – Full support
Chrome 58 (Release date: 2017-04-19)
footnote Full support
Edge – Full support
Edge 15 (Release date: 2017-04-05)
footnote Full support
Firefox – Full support
Firefox 51 (Release date: 2017-01-24)
footnote Full support
Opera – Full support
Opera 45 (Release date: 2017-05-10)
footnote Full support
Safari – No support
Safari
footnote No support
Firefox for Android – Full support
Firefox for Android 51 (Release date: 2017-01-24)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support

Legend

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

Full support
Full support
No support
No support

Note: This API is based on Chromium's chrome.idle API. This documentation is derived from idle.json in the Chromium code.