MozWakeLock.topic

The MozWakeLock.topic read-only property returns a DOMString with the name of the resource locked.

Gaia uses three basic resource names that can be used as topic: screen, cpu, and wifi, but any certified application can expose new resources.

Syntax

JavaScript
name = <code>lock.topic;</code>

Example

JavaScript
var lock = window.navigator.requestWakeLock('screen');
console.log(lock.topic); // return 'screen'

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/topic

API Firefox OS MozWakeLock Property Read-only Reference Wake Lock API