Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. Clients
  4. get()

Clients: get() method

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since ⁨April 2018⁩.

Note: This feature is only available inService Workers.

Theget() method of theClients interface gets a service worker client matching a givenid and returns it in aPromise.

Syntax

js
get(id)

Parameters

id

A string representing the id of the client you want to get.

Return value

APromise that resolves to aClient object orundefined.

Examples

js
self.clients.get(id).then((client) => {  self.clients.openWindow(client.url);});

Specifications

Specification
Service Workers Nightly
# clients-get

Browser compatibility

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp