Wake Lock

The Wake Lock API allows web applications to prevent the resource such as the screen, WiFi connection or CPU from becoming available as long as the application holds a lock for that resource. The purpose of the API is to let the user or the application to complete the activity uninterrupted.

At the moment there are two distinct technologies named Wake Lock API. One is a non-standard implementation available only on Firefox OS, while the second is a W3C proposal at the stage of initial drafts, with no vendor support yet.

API glimpse

lock = navigator.requestWakeLock('screen')
Acquires a wake lock on the resource specified, such as screen, wifi or cpu (Firefox OS implementation).
lock.unlock()
Releases the existing lock (Firefox OS implementation),
screen.keepAwake = true
The property allowing to acquire a screen wake lock when set to true and release it when set to false (W3C proposal).

Resources