WakeLock

The WakeLock interface of the Screen Wake Lock API can be used to request a lock that prevents device screens from dimming or locking when an application needs to keep running. Available only in secure contexts.

MDN Reference

Functions

Link copied to clipboard
suspend fun request(type: WakeLockType = definedExternally): WakeLockSentinel
Link copied to clipboard
fun requestAsync(type: WakeLockType = definedExternally): Promise<WakeLockSentinel>