Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/windmill/node_modules/evt/lib/types/lib.dom.d.ts>ServiceWorkerContainer

Windmill deno client (separated from the main repo because most of the code is auto-generated from the openapi and not worth committing)
Go to Latest
interface ServiceWorkerContainer
implements EventTarget
import { type ServiceWorkerContainer } from "https://deno.land/x/windmill@v1.345.2/node_modules/evt/lib/types/lib.dom.d.ts";

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

readonly
controller: ServiceWorker | null
oncontrollerchange: ((this: ServiceWorkerContainer, ev: Event) => any) | null
onmessage: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null
onmessageerror: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null
readonly
ready: Promise<ServiceWorkerRegistration>

Methods

getRegistration(clientURL?: string): Promise<ServiceWorkerRegistration | undefined>
getRegistrations(): Promise<ReadonlyArray<ServiceWorkerRegistration>>
register(scriptURL: string, options?: RegistrationOptions): Promise<ServiceWorkerRegistration>
startMessages(): void
addEventListener<K extends keyof ServiceWorkerContainerEventMap>(
type: K,
listener: (this: ServiceWorkerContainer, ev: ServiceWorkerContainerEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void
addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void
removeEventListener<K extends keyof ServiceWorkerContainerEventMap>(
type: K,
listener: (this: ServiceWorkerContainer, ev: ServiceWorkerContainerEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void
removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void