webContents: fix executejavascript when called before page load
This commit is contained in:
parent
0fa92923da
commit
4e6b148eaa
2 changed files with 12 additions and 2 deletions
|
@ -870,6 +870,14 @@ describe('browser-window module', function () {
|
|||
})
|
||||
w.loadURL(server.url)
|
||||
})
|
||||
|
||||
it('executes after page load', function (done) {
|
||||
w.webContents.executeJavaScript(code, function(result) {
|
||||
assert.equal(result, expected)
|
||||
done()
|
||||
})
|
||||
w.loadURL(server.url)
|
||||
})
|
||||
})
|
||||
|
||||
describe('deprecated options', function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue