B2G OS

MozWakeLock.unlock()

The MozWakeLock.unlock() method releases the lock on the resource. If several locks have been taken on the resource, each of them needs to be released individually.

Syntax

lock.unlock();

Exceptions

  • If the lock has already been unlocked, the NS_ERROR_DOM_INVALID_STATE_ERR is raised.

Example

var lock = window.navigator.requestWakeLock('screen');
... // do stuff
lock.unlock(); // unlock the screen resource

Specification

Not part of any specification

See also

Document Tags and Contributors

 Contributors to this page: chrisdavidmills, teoli
 Last updated by: chrisdavidmills,