Conversation
#Electron hackers: What the hell does "just pass" mean in this context?

The example seems to "just pass" the callback to ipcRenderer.on(), but I tested it, and .sender is filtered from the event object when it's received by the callback. (Also I really hope they don't share vulnerable examples)

Taken from: https://www.electronjs.org/docs/latest/tutorial/ipc#2-expose-ipcrendereron-via-preload
2
0
0

After some sleep: maybe this would be the anti-pattern?

(callback) => ipcRenderer.on('update-counter', callback)

0
0
0