ServiceWorker

The ServiceWorker interface of the Service Worker API provides a reference to a service worker. Available only in secure contexts.

MDN Reference

Properties

Link copied to clipboard

Returns the ServiceWorker serialized script URL defined as part of ServiceWorkerRegistration.

Link copied to clipboard

The state read-only property of the of the service worker.

Functions

Link copied to clipboard
Link copied to clipboard
fun postMessage(message: JsAny?, transfer: ReadonlyArray<Transferable>)

The postMessage() method of the ServiceWorker interface sends a message to the worker.

fun postMessage(message: JsAny?, options: StructuredSerializeOptions = definedExternally)
Link copied to clipboard