Skip to main content

on

method MessagePort.prototype.on
Jump to headingMessagePort.prototype.on(
event: "close",
listener: () => void,
): this

Parameters Jump to heading

Jump to headingevent: "close"
Jump to headinglistener: () => void

Return Type Jump to heading

this
Jump to headingMessagePort.prototype.on(
event: "message",
listener: (value: any) => void,
): this

Parameters Jump to heading

Jump to headingevent: "message"
Jump to headinglistener: (value: any) => void

Return Type Jump to heading

this
Jump to headingMessagePort.prototype.on(
event: "messageerror",
listener: (error: Error) => void,
): this

Parameters Jump to heading

Jump to headingevent: "messageerror"
Jump to headinglistener: (error: Error) => void

Return Type Jump to heading

this
Jump to headingMessagePort.prototype.on(
event: string | symbol,
listener: (...args: any[]) => void,
): this

Parameters Jump to heading

Jump to headingevent: string | symbol
Jump to headinglistener: (...args: any[]) => void

Return Type Jump to heading

this
Back to top