send

fun send(channel: String, vararg args: Any?)(source)

Send an asynchronous message to the service worker process via channel, along with arguments. Arguments will be serialized with the Structured Clone Algorithm, just like postMessage, so prototype chains will not be included. Sending Functions, Promises, Symbols, WeakMaps, or WeakSets will throw an exception.

The service worker process can handle the message by listening to channel with the ipcRenderer module.