electron/spec-main/fixtures/sub-frames/preload.js

10 lines
262 B
JavaScript
Raw Normal View History

2020-03-20 20:28:31 +00:00
const { ipcRenderer, webFrame } = require('electron');
2020-03-20 20:28:31 +00:00
window.isolatedGlobal = true;
2020-03-20 20:28:31 +00:00
ipcRenderer.send('preload-ran', window.location.href, webFrame.routingId);
ipcRenderer.on('preload-ping', () => {
2020-03-20 20:28:31 +00:00
ipcRenderer.send('preload-pong', webFrame.routingId);
});