@Generated(value="org.realityforge.webtack")
@JsType(isNative=true,
namespace="<global>",
name="ServiceWorkerRegistration")
public class ServiceWorkerRegistration
extends EventTarget
| Modifier and Type | Field and Description |
|---|---|
@JsNullable EventHandler |
onupdatefound
The onupdatefound property of the ServiceWorkerRegistration interface is an EventListener property called whenever an event of type statechange is fired; it is fired any time the ServiceWorkerRegistration.installing property acquires a new service worker.
|
| Modifier | Constructor and Description |
|---|---|
protected |
ServiceWorkerRegistration() |
| Modifier and Type | Method and Description |
|---|---|
ServiceWorker |
active()
The active property of the ServiceWorkerRegistration interface returns a service worker whose ServiceWorker.state is activating or activated.
|
void |
addUpdatefoundListener(EventListener callback) |
void |
addUpdatefoundListener(EventListener callback,
AddEventListenerOptions options) |
void |
addUpdatefoundListener(EventListener callback,
boolean useCapture) |
@JsNonNull Promise<JsArray<Notification>> |
getNotifications()
The getNotifications() method of the ServiceWorkerRegistration interface returns a list of the notifications in the order that they were created from the current origin via the current service worker registration.
|
@JsNonNull Promise<JsArray<Notification>> |
getNotifications(GetNotificationOptions filter)
The getNotifications() method of the ServiceWorkerRegistration interface returns a list of the notifications in the order that they were created from the current origin via the current service worker registration.
|
ServiceWorker |
installing()
The installing property of the ServiceWorkerRegistration interface returns a service worker whose ServiceWorker.state is installing.
|
NavigationPreloadManager |
navigationPreload()
The navigationPreload read-only property of the ServiceWorkerRegistration interface returns the NavigationPreloadManager associated with the current service worker registration.
|
PushManager |
pushManager()
The pushManager property of the ServiceWorkerRegistration interface returns a reference to the PushManager interface for managing push subscriptions; this includes support for subscribing, getting an active subscription, and accessing push permission status.
|
void |
removeUpdatefoundListener(EventListener callback) |
void |
removeUpdatefoundListener(EventListener callback,
boolean useCapture) |
void |
removeUpdatefoundListener(EventListener callback,
EventListenerOptions options) |
java.lang.String |
scope()
The scope read-only property of the ServiceWorkerRegistration interface returns a unique identifier for a service worker registration.
|
@JsNonNull Promise<java.lang.Void> |
showNotification(java.lang.String title)
The showNotification() method of the ServiceWorkerRegistration interface creates a notification on an active service worker.
|
@JsNonNull Promise<java.lang.Void> |
showNotification(java.lang.String title,
NotificationOptions options)
The showNotification() method of the ServiceWorkerRegistration interface creates a notification on an active service worker.
|
SyncManager |
sync()
The sync property of the ServiceWorkerRegistration interface returns a reference to the SyncManager interface, which manages background synchronization processes.
|
@JsNonNull Promise<java.lang.Boolean> |
unregister()
The unregister() method of the ServiceWorkerRegistration interface unregisters the service worker registration and returns a Promise.
|
@JsNonNull Promise<java.lang.Void> |
update()
The update() method of the ServiceWorkerRegistration interface attempts to update the service worker.
|
java.lang.String |
updateViaCache() |
ServiceWorker |
waiting()
The waiting property of the ServiceWorkerRegistration interface returns a service worker whose ServiceWorker.state is installed.
|
addEventListener, addEventListener, addEventListener, dispatchEvent, removeEventListener, removeEventListener, removeEventListenerassign, create, create, defineProperties, defineProperty, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyDescriptor, getOwnPropertyDescriptors, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toString_, valueOf_, valuespublic @JsNullable EventHandler onupdatefound
@JsProperty(name="active") @Nullable public ServiceWorker active()
@JsProperty(name="installing") @Nullable public ServiceWorker installing()
@JsProperty(name="navigationPreload") @Nonnull public NavigationPreloadManager navigationPreload()
@JsProperty(name="pushManager") @Nonnull public PushManager pushManager()
@JsProperty(name="scope") @Nonnull public java.lang.String scope()
@JsProperty(name="sync") @Nonnull public SyncManager sync()
@JsProperty(name="updateViaCache") @Nonnull @ServiceWorkerUpdateViaCache public java.lang.String updateViaCache()
@JsProperty(name="waiting") @Nullable public ServiceWorker waiting()
public @JsNonNull Promise<java.lang.Boolean> unregister()
public @JsNonNull Promise<java.lang.Void> update()
public @JsNonNull Promise<JsArray<Notification>> getNotifications(@Nonnull GetNotificationOptions filter)
public @JsNonNull Promise<JsArray<Notification>> getNotifications()
public @JsNonNull Promise<java.lang.Void> showNotification(@Nonnull java.lang.String title, @Nonnull NotificationOptions options)
public @JsNonNull Promise<java.lang.Void> showNotification(@Nonnull java.lang.String title)
@JsOverlay
public final void addUpdatefoundListener(@Nonnull
EventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addUpdatefoundListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void addUpdatefoundListener(@Nonnull
EventListener callback)
@JsOverlay
public final void removeUpdatefoundListener(@Nonnull
EventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeUpdatefoundListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void removeUpdatefoundListener(@Nonnull
EventListener callback)