interface dom.ServiceWorkerContainer
implements EventTarget
import { type dom } from "https://deno.land/x/evt@v2.4.22/lib/index.ts";
const { ServiceWorkerContainer } = dom;
The ServiceWorkerContainer interface of the ServiceWorker API provides an object representing the service worker as an overall unit in the network ecosystem, including facilities to register, unregister and update service workers, and access the state of service workers and their registrations.
Properties
oncontrollerchange: ((this: ServiceWorkerContainer, ev: Event) => any) | null
onmessage: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null
onmessageerror: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null
Methods
addEventListener<K extends keyof ServiceWorkerContainerEventMap>(): void
type: K,
listener: (this: ServiceWorkerContainer, ev: ServiceWorkerContainerEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
addEventListener(): void
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
removeEventListener<K extends keyof ServiceWorkerContainerEventMap>(): void
type: K,
listener: (this: ServiceWorkerContainer, ev: ServiceWorkerContainerEventMap[K]) => any,
options?: boolean | EventListenerOptions,