Public Member Functions | Public Attributes

nsIDOMMessageEvent Interface Reference

The nsIDOMMessageEvent interface is used for server-sent events and for cross-domain messaging. More...

import "nsIDOMMessageEvent.idl";

Inheritance diagram for nsIDOMMessageEvent:
Collaboration diagram for nsIDOMMessageEvent:

List of all members.

Public Member Functions

void initMessageEvent (in DOMString aType, in boolean aCanBubble, in boolean aCancelable, in DOMString aData, in DOMString aOrigin, in DOMString aLastEventId, in nsIDOMWindow aSource)
 Initializes this event with the given data, in a manner analogous to the similarly-named method on the nsIDOMEvent interface, also setting the data, origin, source, and lastEventId attributes of this appropriately.

Public Attributes

readonly attribute DOMString data
 Custom string data associated with this event.
readonly attribute DOMString origin
 The origin of the site from which this event originated, which is the scheme, ":", and if the URI has a host, "//" followed by the host, and if the port is not the default for the given scheme, ":" followed by that port.
readonly attribute DOMString lastEventId
 The last event ID string of the event source, for server-sent DOM events; this value is the empty string for cross-origin messaging.
readonly attribute nsIDOMWindow source
 The window which originated this event.

Detailed Description

The nsIDOMMessageEvent interface is used for server-sent events and for cross-domain messaging.

For more information on this interface, please see http://www.whatwg.org/specs/web-apps/current-work/#messageevent


Member Function Documentation

void nsIDOMMessageEvent::initMessageEvent ( in DOMString  aType,
in boolean  aCanBubble,
in boolean  aCancelable,
in DOMString  aData,
in DOMString  aOrigin,
in DOMString  aLastEventId,
in nsIDOMWindow  aSource 
)

Initializes this event with the given data, in a manner analogous to the similarly-named method on the nsIDOMEvent interface, also setting the data, origin, source, and lastEventId attributes of this appropriately.


Member Data Documentation

readonly attribute DOMString nsIDOMMessageEvent::data

Custom string data associated with this event.

readonly attribute DOMString nsIDOMMessageEvent::lastEventId

The last event ID string of the event source, for server-sent DOM events; this value is the empty string for cross-origin messaging.

readonly attribute DOMString nsIDOMMessageEvent::origin

The origin of the site from which this event originated, which is the scheme, ":", and if the URI has a host, "//" followed by the host, and if the port is not the default for the given scheme, ":" followed by that port.

This value does not have a trailing slash.

The window which originated this event.


The documentation for this interface was generated from the following file: