Skip to main content
MessageEvent - Events - Web documentation
interface MessageEvent
extends Event
Private

Type Parameters

T = any

Properties

readonly
data: T
Returns the data of the message.
readonly
origin: string
Returns the origin of the message, for server-sent events.
readonly
lastEventId: string
Returns the last event ID string, for server-sent events.
readonly
source: MessageEventSource | null
readonly
ports: ReadonlyArray<MessagePort>
Returns transferred ports.

Methods

deprecated
initMessageEvent(
type: string,
bubbles?: boolean,
cancelable?: boolean,
data?: any,
origin?: string,
lastEventId?: string,
source?: MessageEventSource | null,
ports?: MessagePort[],
): void