SharedWorker

open external class SharedWorker : 
    EventTarget,
    AbstractWorker
(source)

Platform and version requirements: JS

Exposes the JavaScript SharedWorker to Kotlin

Constructors

<init>

SharedWorker(
    scriptURL: String,
    name: String = definedExternally,
    options: WorkerOptions = definedExternally)

Exposes the JavaScript SharedWorker to Kotlin

Properties

onerror

open var onerror: (Event) -> dynamic

port

open val port: MessagePort

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)