fix: protocol events can't be received on Electron

This commit is contained in:
Tienson Qin
2021-12-23 17:57:22 +08:00
committed by rcmerci
parent 25d3958bec
commit ef6e159675

View File

@@ -67,18 +67,14 @@
(callback #js {:path path'})))) (callback #js {:path path'}))))
(.registerHttpProtocol (.on app "open-url"
protocol LSP_SCHEME (fn [event url]
(fn [^js request callback] (prn {:url url
(prn "Request: " (gobj/get request "url")) :event event})))
(js/console.dir request)
;; placeholder
))
#(do #(do
(.unregisterProtocol protocol FILE_LSP_SCHEME) (.unregisterProtocol protocol FILE_LSP_SCHEME)
(.unregisterProtocol protocol "assets") (.unregisterProtocol protocol "assets")))
(.unregisterProtocol protocol LSP_SCHEME)))
(defn- handle-export-publish-assets [_event html custom-css-path repo-path asset-filenames output-path] (defn- handle-export-publish-assets [_event html custom-css-path repo-path asset-filenames output-path]
(p/let [app-path (. app getAppPath) (p/let [app-path (. app getAppPath)