postMessage

fun postMessage(message: Any?, transfer: ReadonlyArray<MessagePortMain> = definedExternally)(source)

Sends a message from the port, and optionally, transfers ownership of objects to other browsing contexts.