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
JavaScript
Copy Code
lock.unlock();
Exceptions
- If the lock has already been unlocked, the
NS_ERROR_DOM_INVALID_STATE_ERR
is raised.
Example
JavaScript
Copy Code
var lock = window.navigator.requestWakeLock('screen'); </code><code>... // do stuff lock.unlock(); // unlock the screen resource
Specification
Not part of any specification
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/mozwakelock/unlock