Navigator.removeIdleObserver()

This API is available on FirefoxOS only and for certified applications only.

This method is used to remove an idle observer previously set with navigator.addIdleObserver.

Syntax

JavaScript
navigator.removeIdleObserver(IdleObserver);
IdleObserver
An object that was previously added with navigator.addIdleObserver.

Example

JavaScript
var myObserver = {
  time: 10
  onidle: function () {
    console.log("The user is idle for 10 seconds");
  },
  onactive: function () {
    console.log("The user is now active again");
  }
}

navigator.addIdleObserver(myObserver);

navigator.removeIdleObserver(myObserver);

Specifications

Not part of any specification yet; however, this API will be discussed at W3C as part of the System Applications Working Group.

See also

License

© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-us/docs/web/api/navigator/removeidleobserver

API Firefox OS Idle Method Non-standard Reference