title: How to open WKWebView target='_blank' links externally (OS X)?
body: <p>I'm trying to have a <code>WKWebView</code> in my Mac app (Objective-C) open links with <code>_target='_blank'</code> externally in the default web browser (i.e. using <code>[[NSWorkspace sharedWorkspace] openURL:aURL]</code>).</p>
  
  <p>I've read two similar questions (<a href="https://stackoverflow.com/questions/25713069/why-is-wkwebview-not-opening-links-with-target-blank">1</a>, <a href="https://stackoverflow.com/questions/31955880/wkwebview-not-opening-some-target-blank-links">2</a>) but the solutions found do not work for me on OS X. For 1, <code>webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures</code> gives a nil request URL; and 2 does not work for some pages with dynamic content (e.g. <a href="https://inbox.google.com" rel="nofollow noreferrer">Inbox by Google / inbox.google.com</a>).</p>
  
  <p>Are there any good or unorthodox/hack-y solutions to the problem for OS X? Seeing as <code>decidePolicyForNavigationAction</code> provides a <code>nil</code> URL for the <code>navigationAction</code>'s <code>request.URL</code>, is there another way of getting clicked links to open them in the user's browser?</p>