electron/spec-main/fixtures/remote/preload-remote-function.js

5 lines
175 B
JavaScript

const { remote, ipcRenderer } = require('electron');
remote.getCurrentWindow().rendererFunc = () => {
ipcRenderer.send('done');
};
remote.getCurrentWindow().rendererFunc();