public override void DidCommitNavigation(WKWebView webView, WKNavigation navigation) { if (_currentUri != null && _currentNavigation == navigation) { _webView.HandleNavigationStarting(_currentUri); } }
public override void OnPageStarted(AWebView view, string url, Bitmap favicon) { if (view is null) { throw new ArgumentNullException(nameof(view)); } if (_renderer?.Element == null || _webView == null || string.IsNullOrWhiteSpace(url) || url == WebViewRenderer.AssetBaseUrl) { return; } _renderer.SyncNativeCookiesToElement(url); var cancel = false; if (!url.Equals(_renderer.UrlCanceled, StringComparison.OrdinalIgnoreCase)) { cancel = SendNavigatingCanceled(url); } _renderer.UrlCanceled = null; if (cancel) { _navigationResult = WebNavigationResult.Cancel; view.StopLoading(); } else { _navigationResult = WebNavigationResult.Success; base.OnPageStarted(view, url, favicon); _webView.HandleNavigationStarting(new Uri(url)); } }