electron/spec/fixtures/sub-frames/preload.js
Samuel Maddock 8ec304f32f fix: run subframe preload bundles in isolated context (#17165)
* fix: run subframe preload bundles in isolated context

* test subframe contextIsolation when disabled
2019-03-07 14:46:57 -08:00

9 lines
257 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)
})