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