         
         let webConfiguration = WKWebViewConfiguration()
         webView = WKWebView(frame: self.view.bounds, configuration: webConfiguration)
-        webView?.uiDelegate = self
+        webView?.navigationDelegate = self
         view = webView!
         
         // Allows for Web Inspector in WKWebView with ctrl click

import Cocoa
import WebKit

class ViewController: NSViewController, WKUIDelegate {
    var webView: WKWebView?
    
    override func viewDidLoad() {

    }
}

// To handle context menu Reload
extension ViewController: WKNavigationDelegate {

    func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) {
        
        decisionHandler(.allow)
        
        if navigationAction.navigationType == WKNavigationType.reload  {
            webView.loadHTMLString(mySVGString(), baseURL: nil)
        }
    }
}
