Keeps the device screen awake via the Screen Wake Lock API while enabled.
Requests automatically when enabled becomes true (Chromium allows this without a
button). Call armFromUserGesture from taps as a fallback when the UA requires it.
Requires a secure context
(HTTPS, or http://localhost). Plain http://192.168.x.x will not work on Chrome Android.
Parameters
enabled: boolean
When true, attempt to hold a screen wake lock.
Returns WakeLockControls
Status plus armFromUserGesture for tap-driven (re)acquire.
Keeps the device screen awake via the Screen Wake Lock API while
enabled. Requests automatically whenenabledbecomes true (Chromium allows this without a button). CallarmFromUserGesturefrom taps as a fallback when the UA requires it. Requires a secure context (HTTPS, orhttp://localhost). Plainhttp://192.168.x.xwill not work on Chrome Android.