3df6d337f3
* feat: add isMainFrame to events emitted via ipcRenderer.sendTo() * chore: rename isMainFrame to senderIsMainFrame
9 lines
328 B
JavaScript
9 lines
328 B
JavaScript
const { ipcRenderer } = require('electron');
|
|
|
|
ipcRenderer.on('ping', function ({ senderId, senderIsMainFrame }, payload) {
|
|
ipcRenderer.sendTo(senderId, 'pong', { payload, senderIsMainFrame });
|
|
});
|
|
|
|
ipcRenderer.on('ping-æøåü', function (event, payload) {
|
|
ipcRenderer.sendTo(event.senderId, 'pong-æøåü', payload);
|
|
});
|