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

Commit ab2325c

Browse files
authored
Added implementation for provisional failure handling method for WkWebview. (#12327) fixes #12312 fixes #12732
1 parent 79828df commit ab2325c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Xamarin.Forms.Platform.iOS/Renderers/WkWebViewRenderer.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,16 @@ public override void DidFailNavigation(WKWebView webView, WKNavigation navigatio
664664
_renderer.UpdateCanGoBackForward();
665665
}
666666

667+
public override void DidFailProvisionalNavigation(WKWebView webView, WKNavigation navigation, NSError error)
668+
{
669+
var url = GetCurrentUrl();
670+
WebView.SendNavigated(
671+
new WebNavigatedEventArgs(_lastEvent, new UrlWebViewSource { Url = url }, url, WebNavigationResult.Failure)
672+
);
673+
674+
_renderer.UpdateCanGoBackForward();
675+
}
676+
667677
public override void DidFinishNavigation(WKWebView webView, WKNavigation navigation)
668678
{
669679
if (webView.IsLoading)

0 commit comments

Comments
 (0)