|
|
@ -16,7 +16,6 @@ contextBridge.exposeInMainWorld('electronAPI', { |
|
|
|
plugins: exposedPLugins.map(name => { |
|
|
|
plugins: exposedPLugins.map(name => { |
|
|
|
return { |
|
|
|
return { |
|
|
|
name, |
|
|
|
name, |
|
|
|
activate: () => ipcRenderer.invoke('engine:activatePlugin', name), |
|
|
|
|
|
|
|
on: (cb:any) => ipcRenderer.on(`${name}:send`, cb), |
|
|
|
on: (cb:any) => ipcRenderer.on(`${name}:send`, cb), |
|
|
|
send: (message: Partial<Message>) => ipcRenderer.send(`${name}:on`, message) |
|
|
|
send: (message: Partial<Message>) => ipcRenderer.send(`${name}:on`, message) |
|
|
|
} |
|
|
|
} |
|
|
|