MessagePort.addEventListener - Web documentation
method MessagePort.addEventListener
MessagePort.addEventListener<K extends keyof MessagePortEventMap>(
type: K,
listener: () => any,
options?: boolean | AddEventListenerOptions,
): void

Type Parameters

K extends keyof MessagePortEventMap

Parameters

type: K
listener: () => any
optional
options: boolean | AddEventListenerOptions

Return Type

void
MessagePort.addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void

Parameters

type: string
optional
options: boolean | AddEventListenerOptions

Return Type

void