This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The Client interface represents an executable context such as a Worker, or a SharedWorker. Window clients are represented by the more-specific WindowClient. You can get Client/WindowClient objects from methods such as Clients.matchAll() and Clients.get().

Methods

Client.postMessage()
Sends a message to the client.

Properties

Client.id Read only
The universally unique identifier of the client as a string.
Client.type Read only
The client's type as a string. It can be "window", "worker", or "sharedworker".
Client.url Read only
The URL of the client as a string.

Specifications

Specification Status Comment
Service Workers
The definition of 'Client' in that specification.
Working Draft Initial definition.

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support40 ?441 No27 No
frameType43 ?441 No30 No
id40 ?441 No27 No
postMessage45 ?441 No32 No
type60 ?54 No47 No
url40 ?441 No27 No
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support4040 ?4427 No4.0
frameType4343 No4430 No4.0
id4040 ?4427 No4.0
postMessage4545 No4432 No5.0
type6060 ?5447 No No
url4040 ?4427 No4.0

1. Service workers (and Push) have been disabled in the Firefox 45 & 52 Extended Support Releases (ESR).

See also

Document Tags and Contributors

 Last updated by: fscholz,