W3cubDocs

/Deno

MessageEvent

class MessageEvent<T = any> extends Event {
constructor(type: string, eventInitDict?: MessageEventInit);
readonly data: T;
readonly lastEventId: string;
readonly ports: ReadonlyArray<MessagePort>;
}

Type Parameters

T = any

Extends

Event

Constructors

new MessageEvent(type: string, eventInitDict?: MessageEventInit)

Properties

data: T

Returns the data of the message.

lastEventId: string

Returns the last event ID string, for server-sent events.

ports: ReadonlyArray<MessagePort>

Returns transfered ports.

© 2018–2021 the Deno authors
https://doc.deno.land/deno/stable/~/MessageEvent