initMessageEvent
Summary
Initializes a new cross-document message (XDM) event that the createEvent method created.
Method of dom/MessageEventdom/MessageEvent
Syntax
event.initMessageEvent(eventType, canBubble, cancelable, data, origin, lastEventId, source);
Parameters
eventType
- Data-type
- String
The name of the event. Sets the value for the type property.
canBubble
- Data-type
- Boolean
Whether the event propagates upward. Sets the value for the bubbles property.
cancelable
- Data-type
- Boolean
Whether the event is cancelable and so preventDefault can be called. Sets the value for the cancelable property.
data
- Data-type
- any
The cross-document message. Sets the value for the data property.
origin
- Data-type
- String
The originating domain of the message. Sets the value for the origin property.
lastEventId
- Data-type
- String
Not used. Set this parameter to an empty string.
source
- Data-type
- Object
A reference to the window that generated the event. Sets the value for the source property.
Return Value
No return value
Related specifications
- W3C HTML5
- Working Draft
- WHATWG HTML
- Living Standard
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]