Merge pull request #5199 from Mr0grog/5183-disambiguate-loading-from-main-frame-loading
Add `isLoadingMainFrame()` to WebContents
This commit is contained in:
commit
aa29dc0c8a
6 changed files with 88 additions and 1 deletions
|
@ -116,7 +116,7 @@ let wrapWebContents = function (webContents) {
|
|||
callback = hasUserGesture
|
||||
hasUserGesture = false
|
||||
}
|
||||
if (this.getURL() && !this.isLoading()) {
|
||||
if (this.getURL() && !this.isLoadingMainFrame()) {
|
||||
return asyncWebFrameMethods.call(this, requestId, 'executeJavaScript', callback, code, hasUserGesture)
|
||||
} else {
|
||||
return this.once('did-finish-load', asyncWebFrameMethods.bind(this, requestId, 'executeJavaScript', callback, code, hasUserGesture))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue