electron/spec/fixtures/api/isolated-preload.js

16 lines
367 B
JavaScript
Raw Normal View History

2016-12-13 19:47:54 +00:00
const {ipcRenderer} = require('electron')
window.foo = 3
window.addEventListener('message', (event) => {
ipcRenderer.send('isolated-world', {
preloadContext: {
preloadProperty: typeof window.foo,
pageProperty: typeof window.hello,
typeofRequire: typeof require,
typeofProcess: typeof process
},
pageContext: event.data
})
})