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
@returns A function to remove the handler
@note Ipc is only supported if 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: 13 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.