interface dom.ServiceWorkerRegistration
implements EventTarget
import { type dom } from "https://deno.land/x/evt@v2.5.2/lib/types/index.ts";
const { ServiceWorkerRegistration } = dom;
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.
Properties
readonly
active: ServiceWorker | nullreadonly
installing: ServiceWorker | nullonupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null
readonly
pushManager: PushManagerreadonly
sync: SyncManagerreadonly
updateViaCache: ServiceWorkerUpdateViaCachereadonly
waiting: ServiceWorker | nullMethods
getNotifications(filter?: GetNotificationOptions): Promise<Notification[]>
showNotification(title: string, options?: NotificationOptions): Promise<void>
addEventListener<K extends keyof ServiceWorkerRegistrationEventMap>(): void
type: K,
listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
addEventListener(): void
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
removeEventListener<K extends keyof ServiceWorkerRegistrationEventMap>(): void
type: K,
listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any,
options?: boolean | EventListenerOptions,