Deno is a small, general-purpose runtime environment for JavaScript with first-class support for various interfaces, ECMAScript modules, and seamless TypeScript integration.
Class MessageEvent returns a message passed as a parameter to its constructor:
class MessageEvent extends Event
// message is of type string
constructor(type: string, eventInitDict?: MessageEventInit)
// data is the message
readonly data: any
// where is message coming from
readonly origin: string
readonly lastEventId: string
interface MessageEventInit extends EventInit {
data?: any;
origin?: string;
lastEventId?: string;
}
declare class MessageEvent extends Event {
readonly data: any;
readonly origin: string;
readonly lastEventId: string;
constructor(type: string, eventInitDict?: MessageEventInit);
}
Free Resources