mozilla
Your Search Results

    Navigator.removeIdleObserver()

    Non-standard
    This feature is not on a current W3C standards track, but it is supported on the Firefox OS platform. Although implementations may change in the future and it is not supported widely across browsers, it is suitable for use in code dedicated to Firefox OS apps.

    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: Sheppy, Sicking, teoli, kscarfone, Jeremie
    Last updated by: teoli,
    Hide Sidebar