[ad_1]
i created new popup in wkwebview (onclick=”popopen(this.href))
public override WKWebView CreateWebView(WKWebView webView, WKWebViewConfiguration configuration, WKNavigationAction navigationAction, WKWindowFeatures windowFeatures)
{if (navigationAction.TargetFrame == null)
{WKPreferences wkPreferences = new WKPreferences() { JavaScriptCanOpenWindowsAutomatically = true, JavaScriptEnabled = true };
wkPreferences.SetValueForKey(NSObject.FromObject(true), (NSString)"allowFileAccessFromFileURLs");
WKWebViewConfiguration wkConfig = new WKWebViewConfiguration();
wkConfig.Preferences = wkPreferences;
WKWebView webView1 = new WKWebView(new CGRect(0, 0, webView.Body.Width, webView.Body.Peak), wkConfig);
webView1.LoadRequest(navigationAction.Request);
webView1.NavigationDelegate = new AllowAllDelegate();
webView1.UIDelegate = this;
webView1.Configuration.ProcessPool = webView.Configuration.ProcessPool;
webView.Superview.AddSubview(webView1);}
and the way to shut new popup? (motion like a href=”#” onclick=”…” )
[ad_2]
