WakeLockSentinel class
Secure context: This feature is available only in secure
contexts (HTTPS), in some or all supporting browsers.
The interface of the Screen Wake Lock API
provides a handle to
the underlying platform wake lock and can be manually released
and reacquired. An Object representing the wake lock is
returned via the navigator.wakelock.request()
method.
An acquired can be released manually via the release()
method,
or automatically via the platform wake lock. This can happen if
the document becomes inactive or looses visibility, if the device
is low on power or the user turns on a power save mode. Releasing
all instances of a given wake lock type will cause the underlying
platform wake lock to be released.
EventTarget
WakeLockSentinel
- Implemented types
- Available extensions
- Annotations
-
- @JS()
- @staticInterop
Constructors
- WakeLockSentinel()
-
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
onrelease
↔ EventHandlerNonNull<
Event> ? -
Available on WakeLockSentinel, provided by the PropsWakeLockSentinel extension
getter/setter pair - released → bool
-
Available on WakeLockSentinel, provided by the PropsWakeLockSentinel extension
no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → WakeLockType
-
Available on WakeLockSentinel, provided by the PropsWakeLockSentinel extension
no setter
Methods
-
addEventListener(
String type, EventListener? callback, [dynamic options]) → void -
Available on EventTarget, provided by the PropsEventTarget extension
-
dispatchEvent(
Event event) → bool -
Available on EventTarget, provided by the PropsEventTarget extension
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
release(
) → Future< void> -
Available on WakeLockSentinel, provided by the PropsWakeLockSentinel extension
-
removeEventListener(
String type, EventListener? callback, [dynamic options]) → void -
Available on EventTarget, provided by the PropsEventTarget extension
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited