addListener MethodStatic

Establish a message handler function for the supplied channel over Ipc. The handler will be called when messages are sent for the channel via BackendIpc.send.

addListener(channel: string, handler: IpcListener): RemoveFunction

note Ipc is only supported if IpcApp.isValid is true.

Parameter Type Description
channel string the name of the channel
handler IpcListener the message handler

Returns - RemoveFunction

A function to remove the handler

Defined in

Last Updated: 12 June, 2024