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.

MDN Reference

Implemented types
Available extensions
Annotations
  • @JS()
  • @staticInterop

Constructors

ServiceWorkerRegistration.new()
factory

Properties

active ServiceWorker?

Available on ServiceWorkerRegistration, provided by the ServiceWorkerRegistration$Typings extension

MDN Reference
no setter
addEventListener ↔ void Function(String, [Object?, Object?])

Available on EventTarget, provided by the EventTarget$Typings extension

getter/setter pair
addEventListener → ({void Function<K$>(ServiceWorkerRegistrationEventMap<K$> type, dynamic listener(K$), [Object? options]) $1, void Function(String type, Object listener, [Object? options]) $2})

Available on ServiceWorkerRegistration, provided by the ServiceWorkerRegistration$Typings extension

Overload accessor: $1, $2
no setter
dispatchEvent bool Function(Event)

Available on EventTarget, provided by the EventTarget$Typings extension

getter/setter pair
getNotifications Future<List<Notification>> Function([GetNotificationOptions?])

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 Reference
no setter

Available on ServiceWorkerRegistration, provided by the ServiceWorkerRegistration$Typings extension

MDN Reference
no setter
onupdatefound ↔ dynamic Function(Event)?

Available on ServiceWorkerRegistration, provided by the ServiceWorkerRegistration$Typings extension

MDN Reference
getter/setter pair
pushManager PushManager

Available on ServiceWorkerRegistration, provided by the ServiceWorkerRegistration$Typings extension

MDN Reference
no setter
removeEventListener ↔ void Function(String, [Object?, Object?])

Available on EventTarget, provided by the EventTarget$Typings extension

getter/setter pair
removeEventListener → ({void Function<K$>(ServiceWorkerRegistrationEventMap<K$> type, dynamic listener(K$), [Object? options]) $1, void Function(String type, Object listener, [Object? options]) $2})

Available on ServiceWorkerRegistration, provided by the ServiceWorkerRegistration$Typings extension

Overload accessor: $1, $2
no 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 Reference
no 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 Reference
no setter
waiting ServiceWorker?

Available on ServiceWorkerRegistration, provided by the ServiceWorkerRegistration$Typings extension

MDN Reference
no 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