I implemented the decisions made here and it works for some websites. For example, go to www.tomcruise.com and click on its trailers. Each of these links has target = "_ blank" and begins to open after implementing the solution proposed in the previously associated overflow column.
But now I found that if we go to here and click on any link (the one I tried starting with this question has an href tag as shown below
<a rel="nofollow" target="_blank" href="http://www.nowmagazine.co.uk/celebrity-news/victoria-and-david-beckham-fighting-to-be-together-296082" class="ot-anchor aaTEdf" jslog="10929; track:click" dir="ltr">http:
When I click on this link from WKWebView, the WKUIDelegate method below calls, but has navigationAction.request = ", and therefore nothing happens when the webView.loadRequest (" ") request is called. Does anyone else encounter this problem?
optional func webView(_ webView: WKWebView, createWebViewWithConfiguration configuration: WKWebViewConfiguration, forNavigationAction navigationAction: WKNavigationAction, windowFeatures windowFeatures: WKWindowFeatures) -> WKWebView?{ if navigationAction.targetFrame == nil { webView.loadRequest(navigationAction.request) } return nil }
- What is especially important for the href tag above that calls the WKUIDelegate method with an empty URL?
- How do we fix this problem? Let me know how you caused the root problem, as I'm also interested in debugging.
html ios wkwebview
shrutim Aug 12 '15 at 4:10 2015-08-12 04:10
source share