Module

x/evt/lib/index.ts

šŸ’§EventEmitter's typesafe replacement
Go to Latest
interface dom.MessageEvent
implements Event
import { type dom } from "https://deno.land/x/evt@v2.3.1/lib/index.ts";
const { MessageEvent } = dom;

A message received by a target object.

Properties

readonly
data: any

Returns the data of the message.

readonly
lastEventId: string

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

readonly
origin: string

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

readonly
ports: ReadonlyArray<MessagePort>

Returns the MessagePort array sent with the message, for cross-document messaging and channel messaging.

readonly
source: MessageEventSource | null

Returns the WindowProxy of the source window, for cross-document messaging, and the MessagePort being attached, in the connect event fired at SharedWorkerGlobalScope objects.