Worker

JS
1.1
open class Worker : EventTarget, AbstractWorker

Exposes the JavaScript Worker to Kotlin

Constructors

JS
1.1

<init>

Exposes the JavaScript Worker to Kotlin

Worker(
    scriptURL: String,
    options: WorkerOptions = definedExternally)

Properties

JS
1.1

onerror

open var onerror: (Event) -> dynamic
JS
1.1

onmessage

var onmessage: (Event) -> dynamic

Functions

JS
1.1

postMessage

fun postMessage(
    message: Any?,
    transfer: Array<dynamic> = definedExternally)
JS
1.1

terminate

fun terminate()