web api instance method
Clients: get() method
Available in workers
The get() method of the
Clients interface gets a service worker client matching a given
id and returns it in a Promise.
Syntax
get(id)
Parameters
id- : A string representing the id of the client you want to get.
Return value
A Promise that resolves to a Client object or
undefined.
Examples
self.clients.get(id).then((client) => {
self.clients.openWindow(client.url);
});
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.