import { type ServiceWorker } from "https://deno.land/x/windmill@v1.361.1/node_modules/evt/lib/types/lib.dom.d.ts";
This ServiceWorker API interface provides a reference to a service worker. Multiple browsing contexts (e.g. pages, workers, etc.) can be associated with the same service worker, each through a unique ServiceWorker object.
Properties
onstatechange: ((this: ServiceWorker, ev: Event) => any) | null
readonly
state: ServiceWorkerStateMethods
postMessage(message: any, transfer: Transferable[]): void
postMessage(message: any, options?: PostMessageOptions): void
addEventListener<K extends keyof ServiceWorkerEventMap>(): void
type: K,
listener: (this: ServiceWorker, ev: ServiceWorkerEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
addEventListener(): void
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
removeEventListener<K extends keyof ServiceWorkerEventMap>(): void
type: K,
listener: (this: ServiceWorker, ev: ServiceWorkerEventMap[K]) => any,
options?: boolean | EventListenerOptions,