W3cubDocs

/DOM

Client

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 compatibilityUpdate compatibility data on GitHub

Desktop
Chrome Edge Firefox Internet Explorer Opera Safari
Basic support 40 17 44
44
Service workers (and Push) have been disabled in the Firefox 45 & 52 Extended Support Releases (ESR).
No 27 No
frameType 43 17 44
44
Service workers (and Push) have been disabled in the Firefox 45 & 52 Extended Support Releases (ESR).
No 30 No
id 40 ? 44
44
Service workers (and Push) have been disabled in the Firefox 45 & 52 Extended Support Releases (ESR).
No 27 No
postMessage 45 ? 44
44
Service workers (and Push) have been disabled in the Firefox 45 & 52 Extended Support Releases (ESR).
No 32 No
type 60 ? 54 No 47 No
url 40 ? 44
44
Service workers (and Push) have been disabled in the Firefox 45 & 52 Extended Support Releases (ESR).
No 27 No
Mobile
Android webview Chrome for Android Edge Mobile Firefox for Android Opera for Android iOS Safari Samsung Internet
Basic support 40 40 17 44 27 No 4.0
frameType 43 43 17 44 30 No 4.0
id 40 40 ? 44 27 No 4.0
postMessage 45 45 No 44 32 No 5.0
type 60 60 ? 54 47 No No
url 40 40 ? 44 27 No 4.0

See also

© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/Client