Liking cljdoc? Tell your friends :D

web.workers.MessageEvent

The MessageEvent interface represents a message received by a object.

The MessageEvent interface represents a message received by a
object.
raw docstring

constructorcljs

(constructor & args)

Constructor.

The MessageEvent() constructor creates a new web.workers.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 web.DOMString representing a unique ID for the event. This defaults to an empty string ("") if not specified. source: An MessageEventSource (which can be a WindowProxy, web.other.MessagePort, or web.workers.ServiceWorker object) representing the message emitter. This defaults to null if not set. ports: An array of web.other.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.workers.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 `web.DOMString` representing a unique ID for the event. This defaults to an empty string (\"\") if not specified.
source: An MessageEventSource (which can be a `WindowProxy`, `web.other.MessagePort`, or `web.workers.ServiceWorker` object) representing the message emitter. This defaults to null if not set.
ports: An array of `web.other.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`
sourceraw docstring

datacljs

(data this)

Property.

[Read Only]

The data read-only property of the web.workers.MessageEvent represents 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.

[Read Only]

The data read-only property of the `web.workers.MessageEvent`
represents the data sent by the message emitter.

`var data = messageEvent.data;`

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

init-message-eventcljs

(init-message-event this & args)

Method.

Initializes a message event. Do not use this anymore — use the constructor instead.

Method.

Initializes a message event. Do not use this anymore — use the
constructor instead.
sourceraw docstring

last-event-idcljs

(last-event-id this)

Property.

[Read Only]

The lastEventId read-only property of the web.workers.MessageEvent is a web.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.

[Read Only]

The lastEventId read-only property of the `web.workers.MessageEvent`
is a `web.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`
sourceraw docstring

origincljs

(origin this)

Property.

[Read Only]

The origin read-only property of the web.workers.MessageEvent is 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.

[Read Only]

The origin read-only property of the `web.workers.MessageEvent`
is 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`
sourceraw docstring

portscljs

(ports this)

Property.

[Read Only]

The ports read-only property of the web.workers.MessageEvent is an array of web.other.MessagePort objects representing the associated with the channel the message is being sent through appropriate, e.g. in channel messaging or when sending a message a shared worker).

var myPorts = messageEvent.ports;

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

Property.

[Read Only]

The ports read-only property of the `web.workers.MessageEvent`
is an array of `web.other.MessagePort` objects representing the
associated with the channel the message is being sent through
appropriate, e.g. in channel messaging or when sending a message
a shared worker).

`var myPorts = messageEvent.ports;`

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

sourcecljs

(source this)

Property.

[Read Only]

The source read-only property of the web.workers.MessageEvent is a MessageEventSource (which can be a WindowProxy, web.other.MessagePort, web.workers.ServiceWorker object) representing the message

let mySource = messageEvent.source;

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

Property.

[Read Only]

The source read-only property of the `web.workers.MessageEvent`
is a MessageEventSource (which can be a `WindowProxy`, `web.other.MessagePort`,
`web.workers.ServiceWorker` object) representing the message

`let mySource = messageEvent.source;`

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

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

× close