Client

@native @JSType
trait Client extends Object

ΒΆ4.2 Client of Service Workers 1 spec.

class Object
trait Any
class Object
trait Matchable
class Any

Value members

Concrete methods

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.

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.

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 methods

def hasOwnProperty(v: String): Boolean
Inherited from:
Object
def isPrototypeOf(v: Object): Boolean
Inherited from:
Object
def propertyIsEnumerable(v: String): Boolean
Inherited from:
Object
def toLocaleString(): String
Inherited from:
Object
def valueOf(): Any
Inherited from:
Object