ServiceWorker

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. Available only in secure contexts.

MDN Reference

Functions

Link copied to clipboard
Link copied to clipboard
fun postMessage(message: Any?, transfer: ReadonlyArray<Transferable>)
fun postMessage(message: Any?, options: StructuredSerializeOptions = definedExternally)