Add initial isolated world spec
This commit is contained in:
parent
5da4f032c3
commit
2928fe5c43
3 changed files with 67 additions and 0 deletions
15
spec/fixtures/api/isolated-preload.js
vendored
Normal file
15
spec/fixtures/api/isolated-preload.js
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
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
|
||||
})
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue