Package | dom.events |
Class | public class MessageEvent |
Inheritance | MessageEvent Event Object |
Introduced in: | DOM 3 Events |
See also
Property | Defined By | ||
---|---|---|---|
DOM 2 Events bubbles : Boolean [read-only]
Used to indicate whether or not an event is a bubbling event. | Event | ||
DOM 2 Events cancelable : Boolean [read-only]
Indicates whether the event is cancelable or not. | Event | ||
DOM 2 Events currentTarget : EventTarget [read-only]
Identifies the current target for the event, as the event traverses the DOM. | Event | ||
HTML 5 data : * [read-only]
A string holding the message passed from the other window. | MessageEvent | ||
DOM 3 Events defaulPrevented : Boolean [read-only]
Used to indicate whether Event.preventDefault() has been called for
this event. | Event | ||
DOM 2 Events eventPhase : Number [read-only]
Used to indicate which phase of event flow is currently being accomplished. | Event | ||
Non-Standard explicitOriginalTarget : nsIDOMEventTarget [read-only]
The explicit original target of the event. | Event | ||
Non-Standard isTrusted : Boolean [read-only]
Determines if the event was from the user or script generated. | Event | ||
HTML 5 lastEventId : DOMString [read-only]
Returns the last event ID, for server-sent events. | MessageEvent | ||
DOM 3 Events namespaceURI : DOMString [read-only]
The namespace URI associated with this event at initialization time, or
null if it is unspecified. | Event | ||
HTML 5 origin : DOMString [read-only]
Returns the origin of the message, for server-sent events and cross-document messaging. | MessageEvent | ||
Non-Standard originalTarget : * [read-only]
The original target of the event before any retargetings. | Event | ||
HTML 5 ports : MessagePortArray [read-only]
Returns the MessagePortArray sent with the message, for cross-document messaging and channel messaging. | MessageEvent | ||
HTML 5 source : WindowProxy [read-only]
Returns the WindowProxy of the source window, for cross-document messaging. | MessageEvent | ||
DOM 2 Events target : EventTarget [read-only]
Used to indicate the event target. | Event | ||
DOM 2 Events timeStamp : DOMTimeStamp [read-only]
Used to specify the time at which the event was created in milliseconds
relative to 1970-01-01T00:00:00Z. | Event | ||
DOM 2 Events type : DOMString [read-only]
The local name of the event type. | Event |
Method | Defined By | ||
---|---|---|---|
Initializes attributes of an Event created through the
DocumentEvent.createEvent method. | Event | ||
DOM 3 Events initEventNS(namespaceURIArg:DOMString, typeArg:DOMString, canBubbleArg:Boolean, cancelableArg:Boolean):void
Initializes attributes of an Event object. | Event | ||
HTML 5 initMessageEvent(typeArg:DOMString, canBubbleArg:Boolean, cancelableArg:Boolean, dataArg:DOMString, originArg:DOMString, lastEventIdArg:WindowProxy, sourceArg:MessagePortArray, portsArg:*):void
The initMessageEvent() must initialize the event in a manner analogous to the similarly-named methods in the DOM3 Events interfaces. | MessageEvent | ||
HTML 5 initMessageEventNS(namespaceURIArg:DOMString, typeArg:DOMString, canBubbleArg:Boolean, cancelableArg:Boolean, dataArg:DOMString, originArg:DOMString, lastEventIdArg:WindowProxy, sourceArg:MessagePortArray, portsArg:*):void
The initMessageEventNS() must initialize the event in a manner analogous to the similarly-named methods in the DOM3 Events interfaces. | MessageEvent | ||
Obsolete preventBubble():void
Prevents the event from bubbling. | Event | ||
Obsolete preventCapture():void
This method is deprecated in favor of standard stopPropagation and is removed in Gecko 1.9. | Event | ||
DOM 2 Events preventDefault():void
Cancels the event if it is cancelable, without stopping further propagation of the event. | Event | ||
DOM 3 Events stopImmediatePropogation():void
Prevents other event listeners from being triggered and, unlike
Event.stopPropagation() its effect is immediate . | Event | ||
DOM 2 Events stopPropogation():void
Prevents other event listeners from being triggered but its effect is
deferred until all event listeners attached on the Event.currentTarget
have been triggered . | Event |
HTML 5 data | property |
data:*
[read-only] Introduced in: | DOM 3 Events |
A string holding the message passed from the other window.
public function get data():*
See also
HTML 5 lastEventId | property |
lastEventId:DOMString
[read-only] Introduced in: | DOM 3 Events |
Returns the last event ID, for server-sent events.
public function get lastEventId():DOMString
See also
HTML 5 origin | property |
origin:DOMString
[read-only] Introduced in: | DOM 3 Events |
Returns the origin of the message, for server-sent events and cross-document messaging.
The origin of the window that sent the message at the time postMessage was called. This string is the concatenation of the protocol and "://", the host name if one exists, and ":" followed by a port number if a port is present and differs from the default port for the given protocol. Examples of typical origins are http://example.org (implying port 443), http://example.net (implying port 80), and http://example.com:8080. Note that this origin is not guaranteed to be the current or future origin of that window, which might have been navigated to a different location since postMessage was called.
public function get origin():DOMString
See also
HTML 5 ports | property |
ports:MessagePortArray
[read-only] Introduced in: | DOM 3 Events |
Returns the MessagePortArray sent with the message, for cross-document messaging and channel messaging.
public function get ports():MessagePortArray
See also
HTML 5 source | property |
source:WindowProxy
[read-only] Introduced in: | DOM 3 Events |
Returns the WindowProxy of the source window, for cross-document messaging.
public function get source():WindowProxy
See also
HTML 5 initMessageEvent | () | method |
public function initMessageEvent(typeArg:DOMString, canBubbleArg:Boolean, cancelableArg:Boolean, dataArg:DOMString, originArg:DOMString, lastEventIdArg:WindowProxy, sourceArg:MessagePortArray, portsArg:*):void
Introduced in: | DOM 3 Events |
The initMessageEvent() must initialize the event in a manner analogous to the similarly-named methods in the DOM3 Events interfaces.
Parameters
typeArg:DOMString — Specifies Event.type, the local name of the event type.
| |
canBubbleArg:Boolean — Specifies Event.bubbles. This parameter overrides the intrinsic bubbling behavior of the event.
| |
cancelableArg:Boolean — Specifies Event.cancelable. This parameter overrides the intrinsic cancelable behavior of the event.
| |
dataArg:DOMString — The message being sent.
| |
originArg:DOMString — The origin of the document that sent the message (typically the scheme, hostname, and port of the document, but not its path or fragment identifier).
| |
lastEventIdArg:WindowProxy — The last event ID string of the event source.
| |
sourceArg:MessagePortArray — The WindowProxy of the browsing context of the Window object from which the message came.
| |
portsArg:* — The MessagePortArray being sent, if any.
|
See also
HTML 5 initMessageEventNS | () | method |
public function initMessageEventNS(namespaceURIArg:DOMString, typeArg:DOMString, canBubbleArg:Boolean, cancelableArg:Boolean, dataArg:DOMString, originArg:DOMString, lastEventIdArg:WindowProxy, sourceArg:MessagePortArray, portsArg:*):void
Introduced in: | DOM 3 Events |
The initMessageEventNS() must initialize the event in a manner analogous to the similarly-named methods in the DOM3 Events interfaces.
Parameters
namespaceURIArg:DOMString — Specifies Event.namespaceURI, the namespace URI associated with this event, or null if no namespace.
| |
typeArg:DOMString — Specifies Event.type, the local name of the event type.
| |
canBubbleArg:Boolean — Specifies Event.bubbles. This parameter overrides the intrinsic bubbling behavior of the event.
| |
cancelableArg:Boolean — Specifies Event.cancelable. This parameter overrides the intrinsic cancelable behavior of the event.
| |
dataArg:DOMString — The message being sent.
| |
originArg:DOMString — The origin of the document that sent the message (typically the scheme, hostname, and port of the document, but not its path or fragment identifier).
| |
lastEventIdArg:WindowProxy — The last event ID string of the event source.
| |
sourceArg:MessagePortArray — The WindowProxy of the browsing context of the Window object from which the message came.
| |
portsArg:* — The MessagePortArray being sent, if any.
|
See also