UNPKG

happy-dom-without-node

Version:

Happy DOM is a JavaScript implementation of a web browser without its graphical user interface. It includes many web standards from WHATWG DOM and HTML.

23 lines 659 B
import Event from '../Event.js'; /** * Message event. * * @see https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent */ export default class MessageEvent extends Event { /** * Constructor. * * @param type Event type. * @param [eventInit] Event init. */ constructor(type, eventInit = null) { super(type, eventInit); this.data = eventInit?.data ?? null; this.origin = eventInit?.origin ?? ''; this.lastEventId = eventInit?.lastEventId ?? ''; this.source = eventInit?.source ?? null; this.ports = eventInit?.ports ?? []; } } //# sourceMappingURL=MessageEvent.js.map