ServiceWorkerContainer
The ServiceWorkerContainer interface of the ServiceWorker API provides an object representing the service worker as an overall unit in the network ecosystem, including facilities to register, unregister and update service workers, and access the state of service workers and their registrations. Available only in secure contexts.
Properties
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun getRegistrationAsync(clientURL: String = definedExternally): Promise<ServiceWorkerRegistration?>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun register(scriptURL: String, options: RegistrationOptions = definedExternally): ServiceWorkerRegistration
suspend fun register(scriptURL: URL, options: RegistrationOptions = definedExternally): ServiceWorkerRegistration
Link copied to clipboard
fun registerAsync(scriptURL: String, options: RegistrationOptions = definedExternally): Promise<ServiceWorkerRegistration>
fun registerAsync(scriptURL: URL, options: RegistrationOptions = definedExternally): Promise<ServiceWorkerRegistration>
Link copied to clipboard