ServiceWorkerRegistration class
This ServiceWorker API interface represents the service worker registration. You register a service worker to control one or more pages that share the same origin. Available only in secure contexts.
- Implemented types
- Available extensions
- Annotations
-
- @JS()
- @staticInterop
Constructors
- ServiceWorkerRegistration.new()
-
factory
Properties
- active → ServiceWorker?
-
Available on ServiceWorkerRegistration, provided by the ServiceWorkerRegistration$Typings extension
MDN Referenceno setter - addEventListener ↔ void Function(String, [Object?, Object?])
-
Available on EventTarget, provided by the EventTarget$Typings extension
getter/setter pair -
addEventListener
→ ({void Function<
K$>(ServiceWorkerRegistrationEventMap< $1, void Function(String type, Object listener, [Object? options]) $2})K$> type, dynamic listener(K$), [Object? options]) -
Available on ServiceWorkerRegistration, provided by the ServiceWorkerRegistration$Typings extension
Overload accessor: $1, $2no setter - dispatchEvent ↔ bool Function(Event)
-
Available on EventTarget, provided by the EventTarget$Typings extension
getter/setter pair -
getNotifications
↔ Future<
List< Function([GetNotificationOptions?])Notification> > -
Available on ServiceWorkerRegistration, provided by the ServiceWorkerRegistration$Typings extension
getter/setter pair - hashCode → int
-
The hash code for this object.
no setterinherited
- installing → ServiceWorker?
-
Available on ServiceWorkerRegistration, provided by the ServiceWorkerRegistration$Typings extension
MDN Referenceno setter -
Available on ServiceWorkerRegistration, provided by the ServiceWorkerRegistration$Typings extension
MDN Referenceno setter - onupdatefound ↔ dynamic Function(Event)?
-
Available on ServiceWorkerRegistration, provided by the ServiceWorkerRegistration$Typings extension
MDN Referencegetter/setter pair - pushManager → PushManager
-
Available on ServiceWorkerRegistration, provided by the ServiceWorkerRegistration$Typings extension
MDN Referenceno setter - removeEventListener ↔ void Function(String, [Object?, Object?])
-
Available on EventTarget, provided by the EventTarget$Typings extension
getter/setter pair -
removeEventListener
→ ({void Function<
K$>(ServiceWorkerRegistrationEventMap< $1, void Function(String type, Object listener, [Object? options]) $2})K$> type, dynamic listener(K$), [Object? options]) -
Available on ServiceWorkerRegistration, provided by the ServiceWorkerRegistration$Typings extension
Overload accessor: $1, $2no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scope → String
-
Available on ServiceWorkerRegistration, provided by the ServiceWorkerRegistration$Typings extension
MDN Referenceno setter -
showNotification
↔ Future<
void> Function(String, [NotificationOptions?]) -
Available on ServiceWorkerRegistration, provided by the ServiceWorkerRegistration$Typings extension
getter/setter pair -
unregister
↔ Future<
bool> Function() -
Available on ServiceWorkerRegistration, provided by the ServiceWorkerRegistration$Typings extension
getter/setter pair -
update
↔ Future<
void> Function() -
Available on ServiceWorkerRegistration, provided by the ServiceWorkerRegistration$Typings extension
getter/setter pair - updateViaCache → ServiceWorkerUpdateViaCache
-
Available on ServiceWorkerRegistration, provided by the ServiceWorkerRegistration$Typings extension
MDN Referenceno setter - waiting → ServiceWorker?
-
Available on ServiceWorkerRegistration, provided by the ServiceWorkerRegistration$Typings extension
MDN Referenceno setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited