WindowClient

@native @JSType
trait WindowClient extends Client

The WindowClient interface of the ServiceWorker API represents the scope of a service worker client that is a document in a browser context, controlled by an active worker. The service worker client independently selects and uses a service worker for its own loading and sub-resources.

trait Client
class Object
trait Any
class Object
trait Matchable
class Any

Value members

Abstract methods

def focus(): Promise[WindowClient]

Gives user input focus to the current client and returns a Promise that resolves to the existing WindowClient.

Gives user input focus to the current client and returns a Promise that resolves to the existing WindowClient.

Concrete methods

def focused: Boolean

The focused read-only property of the WindowClient interface is a Boolean that indicates whether the current client has focus.

The focused read-only property of the WindowClient interface is a Boolean that indicates whether the current client has focus.

def visibilityState: String

The visibilityState read-only property of the WindowClient interface indicates the visibility of the current client. This value can be one of hidden, visible, prerender, or unloaded.

The visibilityState read-only property of the WindowClient interface indicates the visibility of the current client. This value can be one of hidden, visible, prerender, or unloaded.

Inherited methods

Inherited from:
Client
def hasOwnProperty(v: String): Boolean
Inherited from:
Object
def id: String

The id attribute must return its associated service worker client's id.

The id attribute must return its associated service worker client's id.

Inherited from:
Client
def isPrototypeOf(v: Object): Boolean
Inherited from:
Object
def postMessage(message: Any, transfer: UndefOr[Array[Transferable]]): Unit

Allows a service worker to send a message to a client (a Window, Worker, or SharedWorker). The message is received in the "message" event on navigator.serviceWorker.

Allows a service worker to send a message to a client (a Window, Worker, or SharedWorker). The message is received in the "message" event on navigator.serviceWorker.

Value parameters:
transfer

A sequence of objects that are transferred with the message. The ownership of these objects is given to the destination side and they are no longer usable on the sending side.

Inherited from:
Client
def propertyIsEnumerable(v: String): Boolean
Inherited from:
Object
def toLocaleString(): String
Inherited from:
Object
def url: String

The url attribute must return the context object's associated service worker client's serialized creation url.

The url attribute must return the context object's associated service worker client's serialized creation url.

Inherited from:
Client
def valueOf(): Any
Inherited from:
Object