ServiceWorkerRegistration

abstract external class ServiceWorkerRegistration : EventTarget

Exposes the JavaScript ServiceWorkerRegistration to Kotlin

Constructors

ServiceWorkerRegistration
Link copied to clipboard
fun ServiceWorkerRegistration()

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
getNotifications
Link copied to clipboard
fun getNotifications(filter: GetNotificationOptions = definedExternally): Promise<Array<Notification>>
methodName
Link copied to clipboard
fun methodName(): Promise<dynamic>
removeEventListener
Link copied to clipboard
fun removeEventListener(type: String, callback: (Event) -> Unit?, options: dynamic = definedExternally)
fun removeEventListener(type: String, callback: EventListener?, options: dynamic = definedExternally)
showNotification
Link copied to clipboard
fun showNotification(title: String, options: NotificationOptions = definedExternally): Promise<Unit>
unregister
Link copied to clipboard
fun unregister(): Promise<Boolean>
update
Link copied to clipboard
fun update(): Promise<Unit>

Properties

active
Link copied to clipboard
open val active: ServiceWorker?
APISpace
Link copied to clipboard
open val APISpace: dynamic
installing
Link copied to clipboard
open val installing: ServiceWorker?
onupdatefound
Link copied to clipboard
open var onupdatefound: (Event) -> dynamic?
scope
Link copied to clipboard
open val scope: String
waiting
Link copied to clipboard
open val waiting: ServiceWorker?