|
@@ -184,7 +184,7 @@ WebContents.prototype.executeJavaScript = function (code, hasUserGesture, callba
|
|
|
return asyncWebFrameMethods.call(this, requestId, 'executeJavaScript', callback, code, hasUserGesture)
|
|
|
} else {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
- this.once('did-finish-load', () => {
|
|
|
+ this.once('did-stop-loading', () => {
|
|
|
asyncWebFrameMethods.call(this, requestId, 'executeJavaScript', callback, code, hasUserGesture).then(resolve).catch(reject)
|
|
|
})
|
|
|
})
|