Trait stdweb::traits::IMessageEvent
[−]
[src]
pub trait IMessageEvent: IEvent where
<Self::Data as TryFrom<Value>>::Error: Debug, { type Data: TryFrom<Value>; fn data(&self) -> Self::Data { ... } fn origin(&self) -> String { ... } fn last_event_id(&self) -> String { ... } fn source(&self) -> Option<Reference> { ... } fn ports(&self) -> Vec<Reference> { ... } }
The MessageEvent interface represents a message received by a target object.
Associated Types
Provided Methods
fn data(&self) -> Self::Data
The data sent by the message emitter.
fn origin(&self) -> String
A string representing the origin of the message emitter.
fn last_event_id(&self) -> String
A string representing a unique ID for the event.
fn source(&self) -> Option<Reference>
A MessageEventSource (which can be a WindowProxy, MessagePort, or ServiceWorker object) representing the message emitter.
fn ports(&self) -> Vec<Reference>
An array of MessagePort objects representing the ports associated with the channel the message is being sent through (where appropriate, e.g. in channel messaging or when sending a message to a shared worker).
Implementors
impl IMessageEvent for SocketMessageEvent type Data = SocketMessageData;