ServiceWorkerContainer

abstract external class ServiceWorkerContainer : EventTarget

Exposes the JavaScript ServiceWorkerContainer to Kotlin

Constructors

ServiceWorkerContainer
Link copied to clipboard
fun ServiceWorkerContainer()

Functions

addEventListener
Link copied to clipboard
fun addEventListener(type: String, callback: (Event) -> Unit?, options: dynamic = definedExternally)
fun addEventListener(type: String, callback: EventListener?, options: dynamic = definedExternally)
dispatchEvent
Link copied to clipboard
fun dispatchEvent(event: Event): Boolean
getRegistration
Link copied to clipboard
fun getRegistration(clientURL: String = definedExternally): Promise<Any?>
getRegistrations
Link copied to clipboard
fun getRegistrations(): Promise<Array<ServiceWorkerRegistration>>
register
Link copied to clipboard
fun register(scriptURL: String, options: RegistrationOptions = definedExternally): Promise<ServiceWorkerRegistration>
removeEventListener
Link copied to clipboard
fun removeEventListener(type: String, callback: (Event) -> Unit?, options: dynamic = definedExternally)
fun removeEventListener(type: String, callback: EventListener?, options: dynamic = definedExternally)
startMessages
Link copied to clipboard
fun startMessages()

Properties

controller
Link copied to clipboard
open val controller: ServiceWorker?
oncontrollerchange
Link copied to clipboard
open var oncontrollerchange: (Event) -> dynamic?
onmessage
Link copied to clipboard
open var onmessage: (MessageEvent) -> dynamic?
ready
Link copied to clipboard
open val ready: Promise<ServiceWorkerRegistration>