Client

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.

Client インターフェイスは、WorkerSharedWorker などの実行可能なコンテキストを表します。Window クライアントは、より具体的な WindowClient によって表されます。Client/WindowClient オブジェクトは Clients.matchAll()Clients.get() などのメソッドから取得できます。

メソッド

Client.postMessage()

メッセージをクライアントに送信します。

プロパティ

Client.id 読取専用

文字列としてのクライアントの汎用一意識別子。

Client.type 読取専用

文字列としてのクライアントの種類。"window""worker""sharedworker" のいずれかです。

Client.url 読取専用

文字列としてのクライアントの URL。

仕様書

Specification
Service Workers
# client-interface

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Client
frameType
id
postMessage
type
url

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support

関連情報