Avoid insecure nodeIntegration in example
This commit is contained in:
parent
ccdeb4746e
commit
000aedf2e7
1 changed files with 5 additions and 1 deletions
|
@ -23,7 +23,11 @@ win.on('closed', () => {
|
||||||
win = null
|
win = null
|
||||||
})
|
})
|
||||||
|
|
||||||
let view = new BrowserView()
|
let view = new BrowserView({
|
||||||
|
webPreferences: {
|
||||||
|
nodeIntegration: false
|
||||||
|
}
|
||||||
|
})
|
||||||
win.addChildView(view)
|
win.addChildView(view)
|
||||||
view.setBounds(0, 0, 300, 300)
|
view.setBounds(0, 0, 300, 300)
|
||||||
view.webContents.loadURL('https://electron.atom.io')
|
view.webContents.loadURL('https://electron.atom.io')
|
||||||
|
|
Loading…
Reference in a new issue