ServiceWorkerRegistration

abstract external class ServiceWorkerRegistration : 
    EventTarget
(source)

Platform and version requirements: JS

Exposes the JavaScript ServiceWorkerRegistration to Kotlin

Constructors

<init>

ServiceWorkerRegistration()

Exposes the JavaScript ServiceWorkerRegistration to Kotlin

Properties

APISpace

open val APISpace: dynamic

active

open val active: ServiceWorker?

installing

open val installing: ServiceWorker?

onupdatefound

open var onupdatefound: (Event) -> dynamic

scope

open val scope: String

waiting

open val waiting: ServiceWorker?

Functions

getNotifications

fun getNotifications(
    filter: GetNotificationOptions = definedExternally
): Promise<dynamic>

methodName

fun methodName(): Promise<dynamic>

showNotification

fun showNotification(
    title: String,
    options: NotificationOptions = definedExternally
): Promise<Unit>

unregister

fun unregister(): Promise<Boolean>

update

fun update(): Promise<Unit>

Inherited Functions

addEventListener

fun addEventListener(
    type: String,
    callback: EventListener?,
    options: dynamic = definedExternally)
fun addEventListener(
    type: String,
    callback: (Event) -> Unit,
    options: dynamic = definedExternally)

dispatchEvent

fun dispatchEvent(event: Event): Boolean

removeEventListener

fun removeEventListener(
    type: String,
    callback: EventListener?,
    options: dynamic = definedExternally)
fun removeEventListener(
    type: String,
    callback: (Event) -> Unit,
    options: dynamic = definedExternally)