webview: adding load-commit event
This commit is contained in:
parent
6b8d4a43a3
commit
0a7a4c0d0a
7 changed files with 27 additions and 4 deletions
|
@ -157,10 +157,10 @@ class WebViewImpl
|
|||
enumerable: true
|
||||
|
||||
# Updates state upon loadcommit.
|
||||
onLoadCommit: (@baseUrlForDataUrl, @currentEntryIndex, @entryCount, @processId, url, isTopLevel) ->
|
||||
onLoadCommit: (webViewEvent) ->
|
||||
oldValue = @webviewNode.getAttribute webViewConstants.ATTRIBUTE_SRC
|
||||
newValue = url
|
||||
if isTopLevel and (oldValue != newValue)
|
||||
newValue = webViewEvent.url
|
||||
if webViewEvent.isMainFrame and (oldValue != newValue)
|
||||
# Touching the src attribute triggers a navigation. To avoid
|
||||
# triggering a page reload on every guest-initiated navigation,
|
||||
# we do not handle this mutation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue