removed will-navigate and did-navigate events
This commit is contained in:
parent
05be71e9bc
commit
18b3dfa350
8 changed files with 5 additions and 48 deletions
|
@ -7,7 +7,6 @@ WEB_VIEW_EVENTS =
|
|||
'did-finish-load': []
|
||||
'did-fail-load': ['errorCode', 'errorDescription']
|
||||
'did-frame-finish-load': ['isMainFrame']
|
||||
'did-navigate': []
|
||||
'did-start-loading': []
|
||||
'did-stop-loading': []
|
||||
'did-get-response-details': ['status', 'newUrl', 'originalUrl',
|
||||
|
|
|
@ -154,14 +154,6 @@ class SrcAttribute extends WebViewAttribute
|
|||
not @.getValue()
|
||||
return
|
||||
|
||||
# Allow users to cancel webview navigation.
|
||||
domEvent = new Event('will-navigate')
|
||||
domEvent['url'] = @getValue()
|
||||
domEvent.cancelable = true
|
||||
domEvent.preventDefault = () =>
|
||||
@setValueIgnoreMutation ''
|
||||
@webViewImpl.webviewNode.dispatchEvent domEvent
|
||||
|
||||
unless @webViewImpl.guestInstanceId?
|
||||
if @webViewImpl.beforeFirstNavigation
|
||||
@webViewImpl.beforeFirstNavigation = false
|
||||
|
@ -169,10 +161,9 @@ class SrcAttribute extends WebViewAttribute
|
|||
return
|
||||
|
||||
# Navigate to |this.src|.
|
||||
if @getValue()
|
||||
httpreferrer = @webViewImpl.attributes[webViewConstants.ATTRIBUTE_HTTPREFERRER].getValue()
|
||||
urlOptions = if httpreferrer then {httpreferrer} else {}
|
||||
remote.getGuestWebContents(@webViewImpl.guestInstanceId).loadUrl @getValue(), urlOptions
|
||||
httpreferrer = @webViewImpl.attributes[webViewConstants.ATTRIBUTE_HTTPREFERRER].getValue()
|
||||
urlOptions = if httpreferrer then {httpreferrer} else {}
|
||||
remote.getGuestWebContents(@webViewImpl.guestInstanceId).loadUrl @getValue(), urlOptions
|
||||
|
||||
# Attribute specifies HTTP referrer.
|
||||
class HttpReferrerAttribute extends WebViewAttribute
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue