electron/spec/fixtures/api/utility-process/preload.js

6 lines
118 B
JavaScript

const { ipcRenderer } = require('electron');
ipcRenderer.on('port', (e, msg) => {
e.ports[0].postMessage(msg);
});