Web/API/Client

From Get docs

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 WorkersThe definition of 'Client' in that specification. Working Draft Initial definition.

Browser compatibility

Update compatibility data on GitHub

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet

Client

Experimental'

Chrome

Full support 40

Edge

Full support 17

Firefox Full support 44

Notes'

Full support 44

Notes'

Notes' Extended Support Releases (ESR) before Firefox 78 ESR do not support service workers and the Push API.

IE

No support No

Opera

Full support 27

Safari

No support No

WebView Android

Full support 40

Chrome Android

Full support 40

Firefox Android

Full support 44

Opera Android

Full support 27

Safari iOS

No support No

Samsung Internet Android

Full support 4.0

frameType

Experimental'

Chrome

Full support 43

Edge

Full support 17

Firefox Full support 44

Notes'

Full support 44

Notes'

Notes' Extended Support Releases (ESR) before Firefox 78 ESR do not support service workers and the Push API.

IE

No support No

Opera

Full support 30

Safari

No support No

WebView Android

Full support 43

Chrome Android

Full support 43

Firefox Android

Full support 44

Opera Android

Full support 30

Safari iOS

No support No

Samsung Internet Android

Full support 4.0

id

Experimental'

Chrome

Full support 40

Edge

Full support ≤79

Firefox Full support 44

Notes'

Full support 44

Notes'

Notes' Extended Support Releases (ESR) before Firefox 78 ESR do not support service workers and the Push API.

IE

No support No

Opera

Full support 27

Safari

No support No

WebView Android

Full support 40

Chrome Android

Full support 40

Firefox Android

Full support 44

Opera Android

Full support 27

Safari iOS

No support No

Samsung Internet Android

Full support 4.0

postMessage

Experimental'

Chrome

Full support 45

Edge

Full support ≤79

Firefox Full support 44

Notes'

Full support 44

Notes'

Notes' Extended Support Releases (ESR) before Firefox 78 ESR do not support service workers and the Push API.

IE

No support No

Opera

Full support 32

Safari

No support No

WebView Android

Full support 45

Chrome Android

Full support 45

Firefox Android

Full support 44

Opera Android

Full support 32

Safari iOS

No support No

Samsung Internet Android

Full support 5.0

type

Experimental'

Chrome

Full support 60

Edge

Full support ≤79

Firefox

Full support 54

IE

No support No

Opera

Full support 47

Safari

No support No

WebView Android

Full support 60

Chrome Android

Full support 60

Firefox Android

Full support 54

Opera Android

Full support 44

Safari iOS

No support No

Samsung Internet Android

Full support 8.0

url

Experimental'

Chrome

Full support 40

Edge

Full support ≤79

Firefox Full support 44

Notes'

Full support 44

Notes'

Notes' Extended Support Releases (ESR) before Firefox 78 ESR do not support service workers and the Push API.

IE

No support No

Opera

Full support 27

Safari

No support No

WebView Android

Full support 40

Chrome Android

Full support 40

Firefox Android

Full support 44

Opera Android

Full support 27

Safari iOS

No support No

Samsung Internet Android

Full support 4.0

Legend

Full support  
Full support
No support  
No support
Experimental. Expect behavior to change in the future.'
Experimental. Expect behavior to change in the future.
See implementation notes.'
See implementation notes.


See also

Client by Mozilla Contributors is licensed under CC-BY-SA 2.5.