W3cubDocs

/Web APIs

Client

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().

Instance methods

Client.postMessage()

Sends a message to the client.

Instance properties

Client.frameType Read only

The client's frame type as a string. It can be "auxiliary", "top-level", "nested", or "none".

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

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
Client 40 17 44 No 27 11.1 40 40 44 27 11.3 4.0
frameType 43 17 44 No 30 11.1 43 43 44 30 11.3 4.0
id 40 17 44 No 27 11.1 40 40 44 27 11.3 4.0
postMessage 40 17 44 No 27 11.1 40 40 44 27 11.3 4.0
type 60 17 54 No 47 11.1 60 60 54 44 11.3 8.0
url 40 17 44 No 27 11.1 40 40 44 27 11.3 4.0

See also

© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/Client