ServiceWorker

JS
1.1
abstract class ServiceWorker : 
    EventTarget,
    AbstractWorker,
    UnionMessagePortOrServiceWorker,
    UnionClientOrMessagePortOrServiceWorker

(source)

Exposes the JavaScript ServiceWorker to Kotlin

Constructors

JS
1.1

<init>

Exposes the JavaScript ServiceWorker to Kotlin

ServiceWorker()

Properties

JS
1.1

onstatechange

open var onstatechange: ((Event) -> dynamic)?
JS
1.1

scriptURL

open val scriptURL: String
JS
1.1

state

open val state: ServiceWorkerState

Functions

JS
1.1

postMessage

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