Provides a handle to the underlying platform wake lock and can be manually released and reacquired.

Documentation WakeLockSentinel by Mozilla Contributors, licensed under CC-BY-SA 2.5.

See also:

Variables

finalreleased:Bool

A boolean a that indicates whether a WakeLockSentinel has been released yet.

finaltype:WakeLockType

A string representation of the currently acquired WakeLockSentinel type.

Methods

release():Promise<Void>

Releases the WakeLockSentinel, returning a Promise that is resolved once the sentinel has been successfully released.

Inherited Variables

Inherited Methods

Defined by EventTarget

addEventListener(type:String, listener:Function, ?options:EitherType<AddEventListenerOptions, Bool>, ?wantsUntrusted:Bool):Void

addEventListener(type:String, listener:EventListener, ?options:EitherType<AddEventListenerOptions, Bool>, ?wantsUntrusted:Bool):Void

Register an event handler of a specific event type on the EventTarget.

Throws:

null

DOMError

dispatchEvent(event:Event):Bool

Dispatch an event to this EventTarget.

Throws:

null

DOMError

removeEventListener(type:String, listener:Function, ?options:EitherType<EventListenerOptions, Bool>):Void

removeEventListener(type:String, listener:EventListener, ?options:EitherType<EventListenerOptions, Bool>):Void

Removes an event listener from the EventTarget.

Throws:

null

DOMError