Clients.get()
構文
self.clients.get(id).then(function(client) { // 返されたクライアントで何かをします });
パラメーター
id
-
取得するクライアントの id を表す
DOMString
。
戻り値
例
self.clients.get(id).then(function(client) {
self.clients.openWindow(client.url);
});
仕様
Specification |
---|
Service Workers # clients-get |
ブラウザーの互換性
BCD tables only load in the browser