Liking cljdoc? Tell your friends :D

web.ServiceWorkerMessageEvent

The ServiceWorkerMessageEvent interface of the web.ServiceWorker contains information about an event sent to aweb.ServiceWorkerContainerThis extends the default message event to allow setting aweb.ServiceWorker` as the source of a message. The event object is accessed via handler function of a message event, when fired by a message from a service worker.

The ServiceWorkerMessageEvent interface of the `web.ServiceWorker
contains information about an event sent to a `web.ServiceWorkerContainer`
This extends the default message event to allow setting a `web.ServiceWorker`
as the source of a message. The event object is accessed via
handler function of a message event, when fired by a message
from a service worker.
raw docstring

constructorcljs

Constructor.

The ServiceWorkerMessageEvent() constructor creates a new web.ServiceWorkerMessageEvent object instance.

type A dom.DOMString that defines the type of the message event being created. init Optional An initialisation object, which should contain the following parameters:

data: The event's data — this can be any type. origin: A dom.DOMString that defines the origin of the corresponding service worker's environment settings object. lastEventId: A dom.DOMString that defines the last event ID of the event source. source: The web.ServiceWorker or web.MessagePort that sent the message. ports: An array containing the web.MessagePort objects connected to the channel sending the message.

See also: https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerMessageEvent/ServiceWorkerMessageEvent

Constructor.

The ServiceWorkerMessageEvent() constructor creates a new `web.ServiceWorkerMessageEvent` object instance.

type
A `dom.DOMString` that defines the type of the message event being created.
init Optional
An initialisation object, which should contain the following parameters:

data: The event's data — this can be any type.
origin: A `dom.DOMString` that defines the origin of the corresponding service worker's environment settings object.
lastEventId: A `dom.DOMString` that defines the last event ID of the event source.
source: The `web.ServiceWorker` or `web.MessagePort` that sent the message.
ports: An array containing the `web.MessagePort` objects connected to the channel sending the message.

See also: `https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerMessageEvent/ServiceWorkerMessageEvent`
sourceraw docstring

datacljs

(data this)

Property.

The data read-only property of the web.ServiceWorkerMessageEvent returns the event's data. It can be any data type.

var myData = ServiceWorkerMessageEventInstance.data;

See also: https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerMessageEvent/data

Property.

The data read-only property of the `web.ServiceWorkerMessageEvent`
returns the event's data. It can be any data type.

`var myData = ServiceWorkerMessageEventInstance.data;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerMessageEvent/data`
sourceraw docstring

last-event-idcljs

(last-event-id this)

Property.

The lastEventID read-only property of the web.ServiceWorkerMessageEvent represents, in server-sent events, the last event ID of the event

var myLastEventId = ServiceWorkerMessageEventInstance.lastEventId;

See also: https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerMessageEvent/lastEventId

Property.

The lastEventID read-only property of the `web.ServiceWorkerMessageEvent`
represents, in server-sent events, the last event ID of the event

`var myLastEventId = ServiceWorkerMessageEventInstance.lastEventId;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerMessageEvent/lastEventId`
sourceraw docstring

origincljs

(origin this)

Property.

The origin read-only property of the web.ServiceWorkerMessageEvent returns the origin of the service worker's environment settings

var myOrigin = ServiceWorkerMessageEventInstance.origin;

See also: https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerMessageEvent/origin

Property.

The origin read-only property of the `web.ServiceWorkerMessageEvent`
returns the origin of the service worker's environment settings

`var myOrigin = ServiceWorkerMessageEventInstance.origin;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerMessageEvent/origin`
sourceraw docstring

portscljs

(ports this)

Property.

The ports read-only property of the web.ServiceWorkerMessageEvent returns an array of web.MessagePort objects connected with message channel the message is being sent through.

var myPorts = ServiceWorkerMessageEventInstance.ports;

See also: https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerMessageEvent/ports

Property.

The ports read-only property of the `web.ServiceWorkerMessageEvent`
returns an array of `web.MessagePort` objects connected with
message channel the message is being sent through.

`var myPorts = ServiceWorkerMessageEventInstance.ports;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerMessageEvent/ports`
sourceraw docstring

set-data!cljs

(set-data! this val)

Property.

The data read-only property of the web.ServiceWorkerMessageEvent returns the event's data. It can be any data type.

var myData = ServiceWorkerMessageEventInstance.data;

See also: https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerMessageEvent/data

Property.

The data read-only property of the `web.ServiceWorkerMessageEvent`
returns the event's data. It can be any data type.

`var myData = ServiceWorkerMessageEventInstance.data;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerMessageEvent/data`
sourceraw docstring

set-last-event-id!cljs

(set-last-event-id! this val)

Property.

The lastEventID read-only property of the web.ServiceWorkerMessageEvent represents, in server-sent events, the last event ID of the event

var myLastEventId = ServiceWorkerMessageEventInstance.lastEventId;

See also: https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerMessageEvent/lastEventId

Property.

The lastEventID read-only property of the `web.ServiceWorkerMessageEvent`
represents, in server-sent events, the last event ID of the event

`var myLastEventId = ServiceWorkerMessageEventInstance.lastEventId;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerMessageEvent/lastEventId`
sourceraw docstring

set-origin!cljs

(set-origin! this val)

Property.

The origin read-only property of the web.ServiceWorkerMessageEvent returns the origin of the service worker's environment settings

var myOrigin = ServiceWorkerMessageEventInstance.origin;

See also: https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerMessageEvent/origin

Property.

The origin read-only property of the `web.ServiceWorkerMessageEvent`
returns the origin of the service worker's environment settings

`var myOrigin = ServiceWorkerMessageEventInstance.origin;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerMessageEvent/origin`
sourceraw docstring

set-ports!cljs

(set-ports! this val)

Property.

The ports read-only property of the web.ServiceWorkerMessageEvent returns an array of web.MessagePort objects connected with message channel the message is being sent through.

var myPorts = ServiceWorkerMessageEventInstance.ports;

See also: https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerMessageEvent/ports

Property.

The ports read-only property of the `web.ServiceWorkerMessageEvent`
returns an array of `web.MessagePort` objects connected with
message channel the message is being sent through.

`var myPorts = ServiceWorkerMessageEventInstance.ports;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerMessageEvent/ports`
sourceraw docstring

set-source!cljs

(set-source! this val)

Property.

The source read-only property of the web.ServiceWorkerMessageEvent a reference to the web.ServiceWorker object of the associated worker that sent the message.

var mySource = ServiceWorkerMessageEventInstance.source;

See also: https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerMessageEvent/source

Property.

The source read-only property of the `web.ServiceWorkerMessageEvent`
a reference to the `web.ServiceWorker` object of the associated
worker that sent the message.

`var mySource = ServiceWorkerMessageEventInstance.source;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerMessageEvent/source`
sourceraw docstring

sourcecljs

(source this)

Property.

The source read-only property of the web.ServiceWorkerMessageEvent a reference to the web.ServiceWorker object of the associated worker that sent the message.

var mySource = ServiceWorkerMessageEventInstance.source;

See also: https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerMessageEvent/source

Property.

The source read-only property of the `web.ServiceWorkerMessageEvent`
a reference to the `web.ServiceWorker` object of the associated
worker that sent the message.

`var mySource = ServiceWorkerMessageEventInstance.source;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerMessageEvent/source`
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close