electron/spec/fixtures/api/utility-process/receive-message.js

7 lines
156 B
JavaScript

process.parentPort.on('message', (e) => {
e.ports[0].on('message', (ev) => {
process.parentPort.postMessage(ev.data);
});
e.ports[0].start();
});