send

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

Send an asynchronous message to the renderer 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.

:::warning

Sending non-standard JavaScript types such as DOM objects or special Electron objects will throw an exception.

:::

For additional reading, refer to Electron's IPC guide.