MDN wants to learn about developers like you: https://qsurvey.mozilla.com/s3/d6d7ff2e2f9c

B2G OS

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

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

Example

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

Document Tags and Contributors

 Contributors to this page: chrisdavidmills, teoli, kscarfone, Sheppy, Jeremie, sicking
 Last updated by: chrisdavidmills,