title: How do I enable links to open in default browser on WebView
body: <p>I'm learning OS X/Swift development and have loaded a webpage with contains links to other websites, how I open these links in the default browser. At the moment when clicking on the links nothing happens at all. This is my ViewController.swift contents:</p>
  
  <pre><code>import Cocoa
  import WebKit
  import Foundation
  
  class ViewController: NSViewController, WebFrameLoadDelegate, WKNavigationDelegate {
  
      @IBOutlet weak var webView: WebView!
  
      override func viewDidLoad() {
          super.viewDidLoad()
  
          let URL = "https://test.mywebsite.com"
  
          self.webView.frameLoadDelegate = self
          self.webView.mainFrame.loadRequest(NSURLRequest(URL: NSURL(string: URL)!))
  
  
  
      }
  
      override var representedObject: AnyObject? {
          didSet {
          // Update the view, if already loaded.
          }
      }
  
  
  }
  </code></pre>