electron/spec/fixtures/module/preload-ipc.js

6 строки
144 B
JavaScript

const { ipcRenderer } = require('electron');
ipcRenderer.on('ping', function (event, message) {
ipcRenderer.sendToHost('pong', message);
});