postMessage

fun postMessage(message: JsAny?, transfer: ReadonlyArray<Transferable>)(source)

The postMessage() method of the Client interface allows a service worker to send a message to a client (a Window, Worker, or SharedWorker).

MDN Reference


fun postMessage(message: JsAny?, options: StructuredSerializeOptions = definedExternally)(source)
fun postMessage(message: String, options: StructuredSerializeOptions = definedExternally)(source)