ServiceWorkers
Functions
Link copied to clipboard
fun addListener(event: ServiceWorkersEvent.CONSOLE_MESSAGE, listener: (event: Event<*>, messageDetails: MessageDetails) -> Unit)
fun addListener(event: ServiceWorkersEvent.REGISTRATION_COMPLETED, listener: (event: Event<*>, details: RegistrationCompletedDetails) -> Unit)
Link copied to clipboard
Link copied to clipboard
A ServiceWorkerInfo object where the keys are the service worker version ID and the values are the information about that service worker.
Link copied to clipboard
Information about this service worker
Link copied to clipboard
Link copied to clipboard
fun off(event: ServiceWorkersEvent.CONSOLE_MESSAGE, listener: (event: Event<*>, messageDetails: MessageDetails) -> Unit)
fun off(event: ServiceWorkersEvent.REGISTRATION_COMPLETED, listener: (event: Event<*>, details: RegistrationCompletedDetails) -> Unit)
Link copied to clipboard
fun on(event: ServiceWorkersEvent.CONSOLE_MESSAGE, listener: (event: Event<*>, messageDetails: MessageDetails) -> Unit)
Emitted when a service worker logs something to the console.
fun on(event: ServiceWorkersEvent.REGISTRATION_COMPLETED, listener: (event: Event<*>, details: RegistrationCompletedDetails) -> Unit)
Emitted when a service worker has been registered. Can occur after a call to navigator.serviceWorker.register('/sw.js')
successfully resolves or when a Chrome extension is loaded.
Link copied to clipboard
fun once(event: ServiceWorkersEvent.CONSOLE_MESSAGE, listener: (event: Event<*>, messageDetails: MessageDetails) -> Unit)
fun once(event: ServiceWorkersEvent.REGISTRATION_COMPLETED, listener: (event: Event<*>, details: RegistrationCompletedDetails) -> Unit)
Link copied to clipboard
fun removeListener(event: ServiceWorkersEvent.CONSOLE_MESSAGE, listener: (event: Event<*>, messageDetails: MessageDetails) -> Unit)
fun removeListener(event: ServiceWorkersEvent.REGISTRATION_COMPLETED, listener: (event: Event<*>, details: RegistrationCompletedDetails) -> Unit)
Link copied to clipboard