mirror of
https://github.com/electron/electron.git
synced 2026-02-19 03:14:51 -05:00
16 lines
367 B
JavaScript
16 lines
367 B
JavaScript
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
|
|
})
|
|
})
|