Clients

The Clients interface provides access to Client objects.

MDN Reference

Functions

Link copied to clipboard
inline suspend fun Clients.claim()

The claim() method of the Clients interface allows an active service worker to set itself as the ServiceWorkerContainer.controller for all clients within its ServiceWorkerRegistration.scope.

Link copied to clipboard

The claim() method of the Clients interface allows an active service worker to set itself as the ServiceWorkerContainer.controller for all clients within its ServiceWorkerRegistration.scope.

Link copied to clipboard
inline suspend fun Clients.get(id: String): Client?

The get() method of the id and returns it in a Promise.

Link copied to clipboard

The get() method of the id and returns it in a Promise.

Link copied to clipboard
inline suspend fun <T : ClientQueryOptions> Clients.matchAll(options: T): ReadonlyArray<Client>

The matchAll() method of the Clients interface returns a Promise for a list of service worker clients whose origin is the same as the associated service worker's origin.

Link copied to clipboard
fun <T : ClientQueryOptions> matchAllAsync(options: T = definedExternally): Promise<ReadonlyArray<Client>>

The matchAll() method of the Clients interface returns a Promise for a list of service worker clients whose origin is the same as the associated service worker's origin.

Link copied to clipboard
inline suspend fun Clients.openWindow(url: String): WindowClient?

The openWindow() method of the Clients interface creates a new top level browsing context and loads a given URL.

inline suspend fun Clients.openWindow(url: URL): WindowClient?
Link copied to clipboard

The openWindow() method of the Clients interface creates a new top level browsing context and loads a given URL.