ServiceWorkerRegistration class

The interface of the Service Worker API represents the service worker registration. You register a service worker to control one or more pages that share the same origin. The lifetime of a service worker registration is beyond that of the objects that represent them within the lifetime of their corresponding service worker clients. The browser maintains a persistent list of active objects.

Note: This feature is available in Web Workers.

EventTarget

ServiceWorkerRegistration

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

Constructors

ServiceWorkerRegistration()
factory

Properties

active ServiceWorker?

Available on ServiceWorkerRegistration, provided by the PropsServiceWorkerRegistration extension

no setter
backgroundFetch BackgroundFetchManager

Available on ServiceWorkerRegistration, provided by the PropsServiceWorkerRegistration extension

no setter
cookies CookieStoreManager

Available on ServiceWorkerRegistration, provided by the PropsServiceWorkerRegistration extension

no setter
hashCode int
The hash code for this object.
no setterinherited
index ContentIndex

Available on ServiceWorkerRegistration, provided by the PropsServiceWorkerRegistration extension

no setter
installing ServiceWorker?

Available on ServiceWorkerRegistration, provided by the PropsServiceWorkerRegistration extension

no setter

Available on ServiceWorkerRegistration, provided by the PropsServiceWorkerRegistration extension

no setter
onupdatefound EventHandlerNonNull<Event>?

Available on ServiceWorkerRegistration, provided by the PropsServiceWorkerRegistration extension

getter/setter pair
paymentManager PaymentManager

Available on ServiceWorkerRegistration, provided by the PropsServiceWorkerRegistration extension

no setter
periodicSync PeriodicSyncManager

Available on ServiceWorkerRegistration, provided by the PropsServiceWorkerRegistration extension

no setter
pushManager PushManager

Available on ServiceWorkerRegistration, provided by the PropsServiceWorkerRegistration extension

no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scope String

Available on ServiceWorkerRegistration, provided by the PropsServiceWorkerRegistration extension

no setter
sync SyncManager

Available on ServiceWorkerRegistration, provided by the PropsServiceWorkerRegistration extension

no setter
updateViaCache ServiceWorkerUpdateViaCache

Available on ServiceWorkerRegistration, provided by the PropsServiceWorkerRegistration extension

no setter
waiting ServiceWorker?

Available on ServiceWorkerRegistration, provided by the PropsServiceWorkerRegistration 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

getNotifications([GetNotificationOptions? filter]) Future<Iterable<Notification>>

Available on ServiceWorkerRegistration, provided by the PropsServiceWorkerRegistration extension

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeEventListener(String type, EventListener? callback, [dynamic options]) → void

Available on EventTarget, provided by the PropsEventTarget extension

showNotification(String title, [NotificationOptions? options]) Future<void>

Available on ServiceWorkerRegistration, provided by the PropsServiceWorkerRegistration extension

toString() String
A string representation of this object.
inherited
unregister() Future<bool>

Available on ServiceWorkerRegistration, provided by the PropsServiceWorkerRegistration extension

update() Future<void>

Available on ServiceWorkerRegistration, provided by the PropsServiceWorkerRegistration extension

Operators

operator ==(Object other) bool
The equality operator.
inherited