WakeLock Class
The Screen Wake Lock API of a window (https://w3c.github.io/screen-wake-lock/#the-wakelock-interface, navigator.wakeLock): the locks that prevent the screen from turning off, acquired with WakeLockOptions.Acquire.
public sealed class WakeLockMethods
| Name | Description |
|---|---|
| Request(WakeLockType) | Requests a wake lock (https://w3c.github.io/screen-wake-lock/#the-request-method). The task fails with a NotAllowedError DomException when the document is not fully active, is not allowed to use the screen-wake-lock feature, is hidden, or when the screen-wake-lock permission is denied. |
Request(WakeLockType)
WakeLock.csRequests a wake lock (https://w3c.github.io/screen-wake-lock/#the-request-method). The task fails with a NotAllowedError DomException when the document is not fully active, is not allowed to use the screen-wake-lock feature, is hidden, or when the screen-wake-lock permission is denied.
public Task<WakeLockSentinel> Request(WakeLockType type = WakeLockType.Screen)