The MessageEvent interface represents a message received by a object.
The MessageEvent interface represents a message received by a object.
Constructor.
The MessageEvent() constructor creates a new web.MessageEvent
object instance.
type The type of MessageEvent that will be created. This can be one of XXX
init Optional
A dictionary object that can contain the following properties:
data: The data you want contained in the MessageEvent. This can be of any data type, and will default to null if not specified.
origin: A web.USVString
representing the origin of the message emitter. This defaults to an empty string ("") if not specified.
lastEventId: A dom.DOMString
representing a unique ID for the event. This defaults to an empty string ("") if not specified.
source: An MessageEventSource (which can be a web.WindowProxy
, web.MessagePort
, or web.ServiceWorker
object) representing the message emitter. This defaults to null if not set.
ports: An array of web.MessagePort
objects representing the ports associated with the channel the message is being sent through (where appropriate, e.g. in channel messaging or when sending a message to a shared worker). This defaults to an empty array ([]) if not specified.
See also: https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/MessageEvent
Constructor. The MessageEvent() constructor creates a new `web.MessageEvent` object instance. type The type of MessageEvent that will be created. This can be one of XXX init Optional A dictionary object that can contain the following properties: data: The data you want contained in the MessageEvent. This can be of any data type, and will default to null if not specified. origin: A `web.USVString` representing the origin of the message emitter. This defaults to an empty string (\"\") if not specified. lastEventId: A `dom.DOMString` representing a unique ID for the event. This defaults to an empty string (\"\") if not specified. source: An MessageEventSource (which can be a `web.WindowProxy`, `web.MessagePort`, or `web.ServiceWorker` object) representing the message emitter. This defaults to null if not set. ports: An array of `web.MessagePort` objects representing the ports associated with the channel the message is being sent through (where appropriate, e.g. in channel messaging or when sending a message to a shared worker). This defaults to an empty array ([]) if not specified. See also: `https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/MessageEvent`
(data this)
Property.
The data read-only property of the web.MessageEvent
interface
the data sent by the message emitter.
var data = messageEvent.data;
See also: https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/data
Property. The data read-only property of the `web.MessageEvent` interface the data sent by the message emitter. `var data = messageEvent.data;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/data`
(last-event-id this)
Property.
The lastEventId read-only property of the web.MessageEvent
is a dom.DOMString
representing a unique ID for the event.
var myId = messageEvent.lastEventId;
See also: https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/lastEventId
Property. The lastEventId read-only property of the `web.MessageEvent` is a `dom.DOMString` representing a unique ID for the event. `var myId = messageEvent.lastEventId;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/lastEventId`
(origin this)
Property.
The origin read-only property of the web.MessageEvent
interface
a web.USVString
representing the origin of the message emitter.
var origin = messageEvent.origin;
See also: https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/origin
Property. The origin read-only property of the `web.MessageEvent` interface a `web.USVString` representing the origin of the message emitter. `var origin = messageEvent.origin;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/origin`
(ports this)
Property.
The ports read-only property of the web.MessageEvent
interface
an array of web.MessagePort
objects representing the ports
with the channel the message is being sent through (where appropriate,
in channel messaging or when sending a message to a shared worker).
var myPorts = messageEvent.ports;
See also: https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/ports
Property. The ports read-only property of the `web.MessageEvent` interface an array of `web.MessagePort` objects representing the ports with the channel the message is being sent through (where appropriate, in channel messaging or when sending a message to a shared worker). `var myPorts = messageEvent.ports;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/ports`
(set-data! this val)
Property.
The data read-only property of the web.MessageEvent
interface
the data sent by the message emitter.
var data = messageEvent.data;
See also: https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/data
Property. The data read-only property of the `web.MessageEvent` interface the data sent by the message emitter. `var data = messageEvent.data;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/data`
(set-last-event-id! this val)
Property.
The lastEventId read-only property of the web.MessageEvent
is a dom.DOMString
representing a unique ID for the event.
var myId = messageEvent.lastEventId;
See also: https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/lastEventId
Property. The lastEventId read-only property of the `web.MessageEvent` is a `dom.DOMString` representing a unique ID for the event. `var myId = messageEvent.lastEventId;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/lastEventId`
(set-origin! this val)
Property.
The origin read-only property of the web.MessageEvent
interface
a web.USVString
representing the origin of the message emitter.
var origin = messageEvent.origin;
See also: https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/origin
Property. The origin read-only property of the `web.MessageEvent` interface a `web.USVString` representing the origin of the message emitter. `var origin = messageEvent.origin;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/origin`
(set-ports! this val)
Property.
The ports read-only property of the web.MessageEvent
interface
an array of web.MessagePort
objects representing the ports
with the channel the message is being sent through (where appropriate,
in channel messaging or when sending a message to a shared worker).
var myPorts = messageEvent.ports;
See also: https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/ports
Property. The ports read-only property of the `web.MessageEvent` interface an array of `web.MessagePort` objects representing the ports with the channel the message is being sent through (where appropriate, in channel messaging or when sending a message to a shared worker). `var myPorts = messageEvent.ports;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/ports`
(set-source! this val)
Property.
The source read-only property of the web.MessageEvent
interface
a MessageEventSource (which can be a web.WindowProxy
, web.MessagePort
,
web.ServiceWorker
object) representing the message emitter.
let mySource = messageEvent.source;
See also: https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/source
Property. The source read-only property of the `web.MessageEvent` interface a MessageEventSource (which can be a `web.WindowProxy`, `web.MessagePort`, `web.ServiceWorker` object) representing the message emitter. `let mySource = messageEvent.source;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/source`
(source this)
Property.
The source read-only property of the web.MessageEvent
interface
a MessageEventSource (which can be a web.WindowProxy
, web.MessagePort
,
web.ServiceWorker
object) representing the message emitter.
let mySource = messageEvent.source;
See also: https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/source
Property. The source read-only property of the `web.MessageEvent` interface a MessageEventSource (which can be a `web.WindowProxy`, `web.MessagePort`, `web.ServiceWorker` object) representing the message emitter. `let mySource = messageEvent.source;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/source`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close