The goog.testing.messaging.MockMessageEvent Class

goog.testing.messaging.MockMessageEvent
> goog.testing.events.Event
> Event

goog.testing.messaging.MockMessageEvent(data, opt_origin, opt_lastEventId, opt_source, opt_ports)

Creates a new fake MessageEvent.

data {*}
The data of the message.
opt_origin {string=}
The origin of the message, for server-sent and cross-document events.
opt_lastEventId {string=}
The last event ID, for server-sent events.
opt_source {Window=}
The proxy for the source window, for cross-document events.
opt_ports {Array.<MessagePort>=}
The Array of ports sent with the message, for cross-document and channel events.

.data {*}

The data of the message.

.defaultPrevented

Inherited from goog.testing.events.Event .

.lastEventId {?string}

The last event ID, for server-sent events.

.origin {?string}

The origin of the message, for server-sent and cross-document events.

.ports {Array.<!MessagePort>}

The Array of ports sent with the message, for cross-document and channel events.

.preventDefault()

Inherited from goog.testing.events.Event .

.propagationStopped_ {boolean}

Inherited from goog.testing.events.Event .

Whether to cancel the event in internal capture/bubble processing for IE.

@suppress
{underscore} Technically public, but referencing this outside this package is strongly discouraged.

.returnValue_ {boolean}

Inherited from goog.testing.events.Event .

Return value for in internal capture/bubble processing for IE.

@suppress
{underscore} Technically public, but referencing this outside this package is strongly discouraged.

.source {Window}

The proxy for the source window, for cross-document events.

.stopPropagation()

Inherited from goog.testing.events.Event .

.wrap(data, opt_origin, opt_lastEventId, opt_source, opt_ports)

Wraps a new fake MessageEvent in a BrowserEvent, like how a real MessageEvent would be wrapped.

data {*}
The data of the message.
opt_origin {string=}
The origin of the message, for server-sent and cross-document events.
opt_lastEventId {string=}
The last event ID, for server-sent events.
opt_source {Window=}
The proxy for the source window, for cross-document events.
opt_ports {Array.<MessagePort>=}
The Array of ports sent with the message, for cross-document and channel events.
returns {goog.events.BrowserEvent}
The wrapping event.