goog.testing.messaging.MockMessageEvent
Classgoog.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
{*}
opt_origin
{string
=}
opt_lastEventId
{string
=}
opt_source
{Window
=}
opt_ports
{Array
.<MessagePort
>=}
.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.
.returnValue_
{boolean
}Inherited from goog.testing.events.Event
.
Return value for in internal capture/bubble processing for IE.
.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
{*}
opt_origin
{string
=}
opt_lastEventId
{string
=}
opt_source
{Window
=}
opt_ports
{Array
.<MessagePort
>=}
goog.events.BrowserEvent
}