All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jsMain.web.broadcast.BroadcastChannel.kt Maven / Gradle / Ivy

// Automatically generated - do not modify!

package web.broadcast

import web.events.EventHandler
import web.events.EventTarget
import web.messaging.MessageEvent

external class BroadcastChannel(
    name: String,
) : EventTarget {
    /** Returns the channel name (as passed to the constructor). */
    val name: String
    var onmessage: EventHandler>?
    var onmessageerror: EventHandler>?

    /** Closes the BroadcastChannel object, opening it up to garbage collection. */
    fun close()

    /** Sends the given message to other BroadcastChannel objects set up for this channel. Messages can be structured objects, e.g. nested objects and arrays. */
    fun postMessage(message: Any?)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy