MDN self-hosted library · e01.org

Client

Service Workers APIservice

no runnable cells web-api-interface upstream source

Service Workers APIservice

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 properties

  • Client.frameType
  • : The client's frame type as a string. It can be "auxiliary", "top-level", "nested", or "none".
  • Client.id
  • : The universally unique identifier of the client as a string.
  • Client.type
  • : The client's type as a string. It can be "window", "worker", or "sharedworker".
  • Client.url
  • : The URL of the client as a string.

Instance methods

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

Specifications

Browser compatibility

See also