Adjust src from will-attach-webview

This commit is contained in:
Kevin Sawicki 2017-02-03 14:01:39 -08:00
parent 8b0d3a2567
commit acff2f6baf
2 changed files with 3 additions and 5 deletions

View file

@ -255,7 +255,8 @@ ipcMain.on('prevent-next-will-attach-webview', (event) => {
}) })
ipcMain.on('disable-node-on-next-will-attach-webview', (event, id) => { ipcMain.on('disable-node-on-next-will-attach-webview', (event, id) => {
event.sender.once('will-attach-webview', (event, guest, webPreferences) => { event.sender.once('will-attach-webview', (event, guest, webPreferences, params) => {
params.src = `file://${path.join(__dirname, '..', 'fixtures', 'pages', 'c.html')}`
webPreferences.nodeIntegration = false webPreferences.nodeIntegration = false
}) })
}) })

View file

@ -1108,7 +1108,7 @@ describe('<webview> tag', function () {
done() done()
}) })
webview.setAttribute('nodeintegration', 'yes') webview.setAttribute('nodeintegration', 'yes')
webview.src = 'file://' + fixtures + '/pages/c.html' webview.src = 'file://' + fixtures + '/pages/a.html'
document.body.appendChild(webview) document.body.appendChild(webview)
}) })
@ -1122,9 +1122,6 @@ describe('<webview> tag', function () {
}) })
}) })
it('emits a new-webview event when first attached that ', () => {
})
it('loads devtools extensions registered on the parent window', function (done) { it('loads devtools extensions registered on the parent window', function (done) {
w = new BrowserWindow({ w = new BrowserWindow({
show: false show: false