Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Added implementation for failure handling method for WkWe… #12327

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Xamarin.Forms.Platform.iOS/Renderers/WkWebViewRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,16 @@ public override void DidFailNavigation(WKWebView webView, WKNavigation navigatio
_renderer.UpdateCanGoBackForward();
}

public override void DidFailProvisionalNavigation(WKWebView webView, WKNavigation navigation, NSError error)
{
var url = GetCurrentUrl();
WebView.SendNavigated(
new WebNavigatedEventArgs(_lastEvent, new UrlWebViewSource { Url = url }, url, WebNavigationResult.Failure)
);

_renderer.UpdateCanGoBackForward();
}

public override void DidFinishNavigation(WKWebView webView, WKNavigation navigation)
{
if (webView.IsLoading)
Expand Down