File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change 4
4
[" electron" :refer [contextBridge ipcRenderer]]))
5
5
6
6
(defonce api
7
- {; ; Strip event as it includes `sender`.
8
- ; ; https://www.electronjs.org/docs/latest/api/ipc-renderer#ipcrendereronchannel-listener
9
- :on (fn [channel f] (.on ipcRenderer channel (fn [_event args] (f args))))
10
- :send (fn [channel args] (.send ipcRenderer channel args))
11
- :invoke (fn [channel args] (.invoke ipcRenderer channel args))
12
- :platform (.-platform js/process)
13
- :versions (.-versions js/process)
14
- :env (.-env js/process)})
7
+ # js {; ; Strip event as it includes `sender`.
8
+ ; ; https://www.electronjs.org/docs/latest/api/ipc-renderer#ipcrendereronchannel-listener
9
+ :on (fn [channel f] (.on ipcRenderer channel (fn [_event args] (f args))))
10
+ :send (fn [channel args] (.send ipcRenderer channel args))
11
+ :invoke (fn [channel args] (.invoke ipcRenderer channel args))
12
+ :platform (.-platform js/process)
13
+ :versions (.-versions js/process)
14
+ :env (.-env js/process)})
15
15
16
16
(defn ^:export init!
17
17
" Expose protected methods that allow the renderer process to use the ipcRenderer.
18
18
https://www.electronjs.org/docs/api/context-bridge"
19
19
[]
20
- (.exposeInMainWorld contextBridge " api" ( clj->js api) ))
20
+ (.exposeInMainWorld contextBridge " api" api))
You can’t perform that action at this time.
0 commit comments