feat: webContents.loadURL returns a promise (#15855)
This commit is contained in:
parent
1b8c11121f
commit
442c1b22e3
6 changed files with 180 additions and 13 deletions
|
@ -429,9 +429,10 @@ describe('remote module', () => {
|
|||
})
|
||||
|
||||
it('emits unhandled rejection events in the renderer process', (done) => {
|
||||
window.addEventListener('unhandledrejection', function (event) {
|
||||
window.addEventListener('unhandledrejection', function handler (event) {
|
||||
event.preventDefault()
|
||||
assert.strictEqual(event.reason.message, 'rejected')
|
||||
window.removeEventListener('unhandledrejection', handler)
|
||||
done()
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue