public override void DidFinishNavigation(WKWebView webView, WKNavigation navigation) { Renderer.InjectJS(WebViewControlDelegate.InjectedFunction); foreach (var key in Element.GetAllCallbacks()) { Renderer.InjectJS(WebViewControlDelegate.GenerateFunctionScript(key)); } Element.InvokeEvent(WebViewEventType.ContentLoaded, new ContentLoadedDelegate(Element, webView.Url.AbsoluteUrl.ToString())); }
public override void DidFinishNavigation(WKWebView webView, WKNavigation navigation) { Renderer.InjectJS(WebViewControlDelegate.InjectedFunction); foreach (var key in Element.GetAllCallbacks()) { Renderer.InjectJS(WebViewControlDelegate.GenerateFunctionScript(key)); } if (webView.Url.AbsoluteUrl != null) { Element.SetValue(FormsWebView.UriProperty, webView.Url.AbsoluteUrl.ToString()); } Element.InvokeEvent(WebViewEventType.NavigationComplete, new NavigationCompletedDelegate(Element, webView.Url.AbsoluteUrl.ToString(), true)); }
public override void DidFinishNavigation(WKWebView webView, WKNavigation navigation) { Renderer.InjectJS(WebViewControlDelegate.InjectedFunction); foreach (var key in Element.GetLocalCallbacks()) { Renderer.InjectJS(WebViewControlDelegate.GenerateFunctionScript(key)); } foreach (var key in Element.GetGlobalCallbacks()) { Renderer.InjectJS(WebViewControlDelegate.GenerateFunctionScript(key)); } Element.InvokeEvent(WebViewEventType.NavigationStackUpdate, new NavigationStackUpdateDelegate(Element, Renderer.Control.CanGoBack, Renderer.Control.CanGoForward)); Element.InvokeEvent(WebViewEventType.ContentLoaded, new ContentLoadedDelegate(Element, webView.Url.AbsoluteUrl.ToString())); }