MessagePort.addEventListener<K extends keyof MessagePortEventMap>(type: K,listener: (this: MessagePort,ev: MessagePortEventMap[K],) => any,options?: boolean | AddEventListenerOptions,): void
K extends keyof MessagePortEventMap
type: K
listener: (this: MessagePort,ev: MessagePortEventMap[K],) => any
optional
options: boolean | AddEventListenerOptions
MessagePort.addEventListener(type: string,listener: EventListenerOrEventListenerObject,options?: boolean | AddEventListenerOptions,): void
listener: EventListenerOrEventListenerObject
optional
options: boolean | AddEventListenerOptions