The ServiceWorkerMessageEvent interface of the web.ServiceWorker contains information about an event sent to a
web.ServiceWorkerContainerThis 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.
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.
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`
(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`
(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`
(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`
(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`
(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`
(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`
(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`
(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`
(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`
(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`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close