Object: MessageEvent
The MessageEvent object extends the Event object and represents an event generated when an object receives a message. To create an instance of a MessageEvent, you must invoke Document.createEvent() with an input parameter of "MessageEvent".
MessageEvent properties
|
Property name |
Type |
Description |
Status |
Support level |
Availability |
|---|---|---|---|---|---|
|
any |
Returns the message being sent. |
read only |
HTML 5 |
6.0 or later |
|
|
DOMString |
Returns the origin of the document that sent the message (typically the scheme, hostname, and port of the document). |
read only |
HTML 5 |
6.0 or later |
|
|
DOMString |
Returns the last event ID string of the event source. |
read only |
HTML 5 |
6.0 or later |
|
|
WindowProxy |
Returns the WindowProxy of the browsing context of the Window object from which the message came. |
read only |
HTML 5 |
6.0 or later |
|
|
MessagePortArray |
Returns the MessagePortArray being sent, if any. |
read only |
HTML 5 |
6.0 or later |