ServiceWorker
abstract class ServiceWorker :
EventTarget,
AbstractWorker,
UnionMessagePortOrServiceWorker,
UnionClientOrMessagePortOrServiceWorker
(source)
Exposes the JavaScript ServiceWorker to Kotlin
Constructors
<init>
Exposes the JavaScript ServiceWorker to Kotlin
ServiceWorker()
Properties
onstatechange
open var onstatechange: ((Event) -> dynamic)?
scriptURL
open val scriptURL: String
state
open val state: ServiceWorkerState
Functions
postMessage
fun postMessage(
message: Any?,
transfer: Array<dynamic> = definedExternally)