mozilla
Your Search Results

    PowerManager.removeWakeLockListener()

    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 Firefox OS for internal applications only.

    Summary

    The removeWakeLockListener method is used to remove a handler previously set with addWakeLockListener.

    Syntax

    PowerManager.removeWakeLockListener(handler);

    Parameters

    handler
    A callback function previously set with addWakeLockListener.

    Example

    function logTheStateOnce(name, state) {
      console.log("The lock state for the resource '" + name + "' is: " + stat);
    
      navigator.mozPower.removeWakeLockListener(logTheStateOnce);
    }
    
    navigator.mozPower.addWakeLockListener(logTheStateOnce);
    

    Specification

    Not part of any specification.

    See also

    Document Tags and Contributors

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