Worker
open external class Worker(scriptURL: String, options: WorkerOptions) : EventTarget, AbstractWorker
Content copied to clipboard
Exposes the JavaScript Worker to Kotlin
Constructors
Worker
Link copied to clipboard
fun Worker(scriptURL: String, options: WorkerOptions = definedExternally)
Content copied to clipboard
Functions
add Event Listener
Link copied to clipboard
fun addEventListener(type: String, callback: (Event) -> Unit?, options: dynamic = definedExternally)
Content copied to clipboard
fun addEventListener(type: String, callback: EventListener?, options: dynamic = definedExternally)
Content copied to clipboard
dispatch Event
Link copied to clipboard
post Message
Link copied to clipboard
fun postMessage(message: Any?, transfer: Array<dynamic> = definedExternally)
Content copied to clipboard
remove Event Listener
Link copied to clipboard
fun removeEventListener(type: String, callback: (Event) -> Unit?, options: dynamic = definedExternally)
Content copied to clipboard
fun removeEventListener(type: String, callback: EventListener?, options: dynamic = definedExternally)
Content copied to clipboard