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

name = lock.topic;

Example

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