BroadcastChannel

open external class BroadcastChannel : EventTarget (source)

Platform and version requirements: JS

Exposes the JavaScript BroadcastChannel to Kotlin

Constructors

<init>

BroadcastChannel(name: String)

Exposes the JavaScript BroadcastChannel to Kotlin

Properties

name

open val name: String

onmessage

var onmessage: (Event) -> dynamic

Functions

close

fun close()

postMessage

fun postMessage(message: Any?)

Inherited Functions

addEventListener

fun addEventListener(
    type: String,
    callback: EventListener?,
    options: dynamic = definedExternally)
fun addEventListener(
    type: String,
    callback: (Event) -> Unit,
    options: dynamic = definedExternally)

dispatchEvent

fun dispatchEvent(event: Event): Boolean

removeEventListener

fun removeEventListener(
    type: String,
    callback: EventListener?,
    options: dynamic = definedExternally)
fun removeEventListener(
    type: String,
    callback: (Event) -> Unit,
    options: dynamic = definedExternally)