mirror of
https://github.com/logseq/logseq.git
synced 2026-04-30 00:46:23 +00:00
electron: add ipc layer
This commit is contained in:
7
resources/js/preload.js
Normal file
7
resources/js/preload.js
Normal file
@@ -0,0 +1,7 @@
|
||||
const {ipcRenderer, contextBridge} = require('electron');
|
||||
|
||||
contextBridge.exposeInMainWorld('api', {
|
||||
doAction: async (arg) => {
|
||||
return await ipcRenderer.invoke('main', arg);
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user