@Generated(value="org.realityforge.webtack")
@JsType(isNative=true,
namespace="<global>",
name="ServiceWorkerGlobalScope")
public class ServiceWorkerGlobalScope
extends WorkerGlobalScope
| Modifier and Type | Field and Description |
|---|---|
@JsNullable ExtendableEventHandler |
onactivate
The onactivate property of the ServiceWorkerGlobalScope interface is an event handler fired whenever an activate event occurs (when the service worker activates).
|
@JsNullable FetchEventHandler |
onfetch
The onfetch property of the ServiceWorkerGlobalScope interface is an event handler fired whenever a fetch event occurs (usually when the WindowOrWorkerGlobalScope.fetch() method is called.)
|
@JsNullable ExtendableEventHandler |
oninstall
The oninstall property of the ServiceWorkerGlobalScope interface is an event handler fired whenever an install event occurs (when the service worker installs).
|
@JsNullable ExtendableMessageEventHandler |
onmessage
The onmessage property of the ServiceWorkerGlobalScope interface is an event handler fired whenever a message event occurs — when incoming messages are received.
|
@JsNullable MessageEventHandler |
onmessageerror
The onmessageerror event handler of the WindowEventHandlers interface is an EventListener, called whenever an MessageEvent of type messageerror is fired on a window—that is, when it receives a message that cannot be deserialized.
|
@JsNullable NotificationEventHandler |
onnotificationclick
The ServiceWorkerGlobalScope.onnotificationclick property is an event handler called whenever the notificationclick event is dispatched on the ServiceWorkerGlobalScope object, that is when a user clicks on a displayed notification spawned by ServiceWorkerRegistration.showNotification().
|
@JsNullable NotificationEventHandler |
onnotificationclose
The ServiceWorkerGlobalScope.onnotificationclose property is an event handler called whenever the notificationclose event is dispatched on the ServiceWorkerGlobalScope object, that is when a user closes a displayed notification spawned by ServiceWorkerRegistration.showNotification().
|
@JsNullable PushEventHandler |
onpush
The ServiceWorkerGlobalScope.onpush event of the ServiceWorkerGlobalScope interface is fired whenever a push message is received by a service worker via a push server.
|
@JsNullable PushSubscriptionChangeEventHandler |
onpushsubscriptionchange
The ServiceWorkerGlobalScope.onpushsubscriptionchange event of the ServiceWorkerGlobalScope interface is fired to indicate a change in push subscription that was triggered outside the application's control, e.g.
|
@JsNullable SyncEventHandler |
onsync |
onerror, onlanguagechange, onoffline, ononline, onrejectionhandled, onunhandledrejection| Modifier | Constructor and Description |
|---|---|
protected |
ServiceWorkerGlobalScope() |
addLanguagechangeListener, addLanguagechangeListener, addLanguagechangeListener, addOfflineListener, addOfflineListener, addOfflineListener, addOnlineListener, addOnlineListener, addOnlineListener, addRejectionhandledListener, addRejectionhandledListener, addRejectionhandledListener, addUnhandledrejectionListener, addUnhandledrejectionListener, addUnhandledrejectionListener, atob, btoa, caches, clearInterval, clearInterval, clearTimeout, clearTimeout, createImageBitmap, createImageBitmap, createImageBitmap, createImageBitmap, crossOriginIsolated, crypto, fetch, fetch, fetch, fetch, fetch, fetch, importScripts, indexedDB, isIndexedDBSupported, isSecureContext, location, navigator, origin, performance, queueMicrotask, removeLanguagechangeListener, removeLanguagechangeListener, removeLanguagechangeListener, removeOfflineListener, removeOfflineListener, removeOfflineListener, removeOnlineListener, removeOnlineListener, removeOnlineListener, removeRejectionhandledListener, removeRejectionhandledListener, removeRejectionhandledListener, removeUnhandledrejectionListener, removeUnhandledrejectionListener, removeUnhandledrejectionListener, reportError, self, setInterval, setInterval, setTimeout, setTimeout, structuredClone, structuredCloneaddEventListener, 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 ExtendableEventHandler onactivate
public @JsNullable FetchEventHandler onfetch
public @JsNullable ExtendableEventHandler oninstall
public @JsNullable ExtendableMessageEventHandler onmessage
public @JsNullable MessageEventHandler onmessageerror
public @JsNullable NotificationEventHandler onnotificationclick
public @JsNullable NotificationEventHandler onnotificationclose
public @JsNullable PushEventHandler onpush
public @JsNullable PushSubscriptionChangeEventHandler onpushsubscriptionchange
public @JsNullable SyncEventHandler onsync
@JsProperty(name="clients") @Nonnull public Clients clients()
@JsProperty(name="registration") @Nonnull public ServiceWorkerRegistration registration()
@JsProperty(name="serviceWorker") @Nonnull public ServiceWorker serviceWorker()
public @JsNonNull Promise<java.lang.Void> skipWaiting()
@JsOverlay
public final void addActivateListener(@Nonnull
ExtendableEventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addActivateListener(@Nonnull
ExtendableEventListener callback,
boolean useCapture)
@JsOverlay
public final void addActivateListener(@Nonnull
ExtendableEventListener callback)
@JsOverlay
public final void removeActivateListener(@Nonnull
ExtendableEventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeActivateListener(@Nonnull
ExtendableEventListener callback,
boolean useCapture)
@JsOverlay
public final void removeActivateListener(@Nonnull
ExtendableEventListener callback)
@JsOverlay
public final void addInstallListener(@Nonnull
ExtendableEventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addInstallListener(@Nonnull
ExtendableEventListener callback,
boolean useCapture)
@JsOverlay
public final void addInstallListener(@Nonnull
ExtendableEventListener callback)
@JsOverlay
public final void removeInstallListener(@Nonnull
ExtendableEventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeInstallListener(@Nonnull
ExtendableEventListener callback,
boolean useCapture)
@JsOverlay
public final void removeInstallListener(@Nonnull
ExtendableEventListener callback)
@JsOverlay
public final void addMessageListener(@Nonnull
ExtendableMessageEventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addMessageListener(@Nonnull
ExtendableMessageEventListener callback,
boolean useCapture)
@JsOverlay
public final void addMessageListener(@Nonnull
ExtendableMessageEventListener callback)
@JsOverlay
public final void removeMessageListener(@Nonnull
ExtendableMessageEventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeMessageListener(@Nonnull
ExtendableMessageEventListener callback,
boolean useCapture)
@JsOverlay
public final void removeMessageListener(@Nonnull
ExtendableMessageEventListener callback)
@JsOverlay
public final void addFetchListener(@Nonnull
FetchEventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addFetchListener(@Nonnull
FetchEventListener callback,
boolean useCapture)
@JsOverlay
public final void addFetchListener(@Nonnull
FetchEventListener callback)
@JsOverlay
public final void removeFetchListener(@Nonnull
FetchEventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeFetchListener(@Nonnull
FetchEventListener callback,
boolean useCapture)
@JsOverlay
public final void removeFetchListener(@Nonnull
FetchEventListener callback)
@JsOverlay
public final void addNotificationclickListener(@Nonnull
NotificationEventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addNotificationclickListener(@Nonnull
NotificationEventListener callback,
boolean useCapture)
@JsOverlay
public final void addNotificationclickListener(@Nonnull
NotificationEventListener callback)
@JsOverlay
public final void removeNotificationclickListener(@Nonnull
NotificationEventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeNotificationclickListener(@Nonnull
NotificationEventListener callback,
boolean useCapture)
@JsOverlay
public final void removeNotificationclickListener(@Nonnull
NotificationEventListener callback)
@JsOverlay
public final void addPushListener(@Nonnull
PushEventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addPushListener(@Nonnull
PushEventListener callback,
boolean useCapture)
@JsOverlay
public final void addPushListener(@Nonnull
PushEventListener callback)
@JsOverlay
public final void removePushListener(@Nonnull
PushEventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removePushListener(@Nonnull
PushEventListener callback,
boolean useCapture)
@JsOverlay
public final void removePushListener(@Nonnull
PushEventListener callback)
@JsOverlay
public final void addPushsubscriptionchangeListener(@Nonnull
PushSubscriptionChangeEventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addPushsubscriptionchangeListener(@Nonnull
PushSubscriptionChangeEventListener callback,
boolean useCapture)
@JsOverlay
public final void addPushsubscriptionchangeListener(@Nonnull
PushSubscriptionChangeEventListener callback)
@JsOverlay
public final void removePushsubscriptionchangeListener(@Nonnull
PushSubscriptionChangeEventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removePushsubscriptionchangeListener(@Nonnull
PushSubscriptionChangeEventListener callback,
boolean useCapture)
@JsOverlay
public final void removePushsubscriptionchangeListener(@Nonnull
PushSubscriptionChangeEventListener callback)
@JsOverlay
public final void addMessageerrorListener(@Nonnull
MessageEventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addMessageerrorListener(@Nonnull
MessageEventListener callback,
boolean useCapture)
@JsOverlay
public final void addMessageerrorListener(@Nonnull
MessageEventListener callback)
@JsOverlay
public final void removeMessageerrorListener(@Nonnull
MessageEventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeMessageerrorListener(@Nonnull
MessageEventListener callback,
boolean useCapture)
@JsOverlay
public final void removeMessageerrorListener(@Nonnull
MessageEventListener callback)
@JsOverlay
public final void addSyncListener(@Nonnull
SyncEventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addSyncListener(@Nonnull
SyncEventListener callback,
boolean useCapture)
@JsOverlay
public final void addSyncListener(@Nonnull
SyncEventListener callback)
@JsOverlay
public final void removeSyncListener(@Nonnull
SyncEventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeSyncListener(@Nonnull
SyncEventListener callback,
boolean useCapture)
@JsOverlay
public final void removeSyncListener(@Nonnull
SyncEventListener callback)
@JsOverlay
public final void addNotificationcloseListener(@Nonnull
NotificationEventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addNotificationcloseListener(@Nonnull
NotificationEventListener callback,
boolean useCapture)
@JsOverlay
public final void addNotificationcloseListener(@Nonnull
NotificationEventListener callback)
@JsOverlay
public final void removeNotificationcloseListener(@Nonnull
NotificationEventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeNotificationcloseListener(@Nonnull
NotificationEventListener callback,
boolean useCapture)
@JsOverlay
public final void removeNotificationcloseListener(@Nonnull
NotificationEventListener callback)