     }
 }
 
+// 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)
+        }
+    }
+}

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

import Cocoa
import WebKit

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