 fileprivate let fileSystemEventsLatency = 2.0
 fileprivate let monitorDispatchQueue = DispatchQueue.global(qos: .userInitiated)
 
-class HtmlPreviewTool: NSView, UiComponent {
+class HtmlPreviewTool: NSView, UiComponent, WKNavigationDelegate {
 
   enum Action {
 

  fileprivate let uuid: String

  fileprivate var mark = Token()

  fileprivate let webview: WKWebView
  fileprivate var monitor: FileSystemEventMonitor?


      self.emitter.emit(UuidAction(uuid: self.uuid, action: Action.selectHtmlFile(urls[0])))
    }
  }

  func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
    self.webview.evaluateJavaScript("document.body.scrollTop = \(self.scrollTop)")
  }
}

