electron/spec/fixtures/module/preload-ipc-ping-pong.js
2020-03-20 13:28:31 -07:00

9 lines
285 B
JavaScript

const { ipcRenderer } = require('electron');
ipcRenderer.on('ping', function (event, payload) {
ipcRenderer.sendTo(event.senderId, 'pong', payload);
});
ipcRenderer.on('ping-æøåü', function (event, payload) {
ipcRenderer.sendTo(event.senderId, 'pong-æøåü', payload);
});