electron/spec-main/fixtures/sub-frames/preload.js
2020-03-20 13:28:31 -07:00

9 lines
262 B
JavaScript

const { ipcRenderer, webFrame } = require('electron');
window.isolatedGlobal = true;
ipcRenderer.send('preload-ran', window.location.href, webFrame.routingId);
ipcRenderer.on('preload-ping', () => {
ipcRenderer.send('preload-pong', webFrame.routingId);
});