The Clients interface provides access to Client objects. Access it via self.clients within a service worker.

Documentation Clients by Mozilla Contributors, licensed under CC-BY-SA 2.5.

See also:

Methods

claim():Promise<Void>

Allows an active service worker to set itself as the ServiceWorkerContainer.controller for all clients within its ServiceWorkerRegistration.scope

get(id:String):Promise<Dynamic>

Returns a Promise for a Client matching a given Client.id.

matchAll(?options:Null<ClientQueryOptions>):Promise<Array<Client>>

Returns a Promise for an array of Client objects. An options argument allows you to control the types of clients returned. 

openWindow(url:String):Promise<WindowClient>

Opens a new browser window for a given url and returns a Promise for the new WindowClient.