Add did-attach-webview event
This commit is contained in:
parent
61e606bedc
commit
6326c6727e
4 changed files with 43 additions and 1 deletions
|
@ -1183,6 +1183,21 @@ describe('<webview> tag', function () {
|
|||
})
|
||||
})
|
||||
|
||||
describe('did-attach-webview event', () => {
|
||||
it('is emitted when a webview has been attached', (done) => {
|
||||
w = new BrowserWindow({
|
||||
show: false
|
||||
})
|
||||
w.webContents.on('did-attach-webview', (event, webContents) => {
|
||||
ipcMain.once('webview-dom-ready', (event, id) => {
|
||||
assert.equal(webContents.id, id)
|
||||
done()
|
||||
})
|
||||
})
|
||||
w.loadURL('file://' + fixtures + '/pages/webview-did-attach-event.html')
|
||||
})
|
||||
})
|
||||
|
||||
it('loads devtools extensions registered on the parent window', function (done) {
|
||||
w = new BrowserWindow({
|
||||
show: false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue