I'm using icpRenderer to send messages in an electron app from the renderer to the main process. Below is the handler that listens for the messages. I'd like to call another function from within that handler. How can I bind this?
const onMessageReceived = (m: string) => {
console.log(m);
};
ipcMain.on('my-custom-signal', (event, arg) => {
this.onMessageReceived(arg);// how can I call this?
});
this- unlike languages such as Javathis.something()is completely different tosomething()