Beispiel #1
0
 public override void DecidePolicy(WKWebView view, WKNavigationAction navAction, Action <WKNavigationActionPolicy> handler)
 {
     if (navAction.NavigationType == WKNavigationType.LinkActivated)
     {
         handler?.Invoke(WKNavigationActionPolicy.Cancel);
         view.BeginInvokeOnMainThread(() => UIApplication.SharedApplication.OpenUrl(navAction.Request.Url));
     }
     else
     {
         handler?.Invoke(WKNavigationActionPolicy.Allow);
     }
 }