Share via


WebView.NavigationFailed Event

Definition

Note

NavigationFailed may be altered or unavailable for releases after Windows 8.1. Instead, use NavigationCompleted.

Occurs when the WebView cannot complete the navigation attempt.

public:
 virtual event WebViewNavigationFailedEventHandler ^ NavigationFailed;
/// [add: Windows.Foundation.Metadata.Deprecated("NavigationFailed may be altered or unavailable for releases after Windows 8.1. Instead, use NavigationCompleted.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Foundation.UniversalApiContract)]
/// [remove: Windows.Foundation.Metadata.Deprecated("NavigationFailed may be altered or unavailable for releases after Windows 8.1. Instead, use NavigationCompleted.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Foundation.UniversalApiContract)]
// Register
event_token NavigationFailed(WebViewNavigationFailedEventHandler const& handler) const;

// Revoke with event_token
void NavigationFailed(event_token const* cookie) const;

// Revoke with event_revoker
WebView::NavigationFailed_revoker NavigationFailed(auto_revoke_t, WebViewNavigationFailedEventHandler const& handler) const;
/// [add: Windows.Foundation.Metadata.Deprecated("NavigationFailed may be altered or unavailable for releases after Windows 8.1. Instead, use NavigationCompleted.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
/// [remove: Windows.Foundation.Metadata.Deprecated("NavigationFailed may be altered or unavailable for releases after Windows 8.1. Instead, use NavigationCompleted.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
// Register
event_token NavigationFailed(WebViewNavigationFailedEventHandler const& handler) const;

// Revoke with event_token
void NavigationFailed(event_token const* cookie) const;

// Revoke with event_revoker
WebView::NavigationFailed_revoker NavigationFailed(auto_revoke_t, WebViewNavigationFailedEventHandler const& handler) const;
[add: Windows.Foundation.Metadata.Deprecated("NavigationFailed may be altered or unavailable for releases after Windows 8.1. Instead, use NavigationCompleted.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Foundation.UniversalApiContract))]
[remove: Windows.Foundation.Metadata.Deprecated("NavigationFailed may be altered or unavailable for releases after Windows 8.1. Instead, use NavigationCompleted.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Foundation.UniversalApiContract))]
public event WebViewNavigationFailedEventHandler NavigationFailed;
[add: Windows.Foundation.Metadata.Deprecated("NavigationFailed may be altered or unavailable for releases after Windows 8.1. Instead, use NavigationCompleted.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
[remove: Windows.Foundation.Metadata.Deprecated("NavigationFailed may be altered or unavailable for releases after Windows 8.1. Instead, use NavigationCompleted.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
public event WebViewNavigationFailedEventHandler NavigationFailed;
function onNavigationFailed(eventArgs) { /* Your code */ }
webView.addEventListener("navigationfailed", onNavigationFailed);
webView.removeEventListener("navigationfailed", onNavigationFailed);
- or -
webView.onnavigationfailed = onNavigationFailed;
Public Custom Event NavigationFailed As WebViewNavigationFailedEventHandler 
<WebView NavigationFailed="eventhandler" />

Event Type

Attributes

Applies to