mirror of
https://github.com/electron-vite/electron-vite-vue
synced 2025-01-19 11:56:36 +08:00
Merge pull request #37 from GodofRabbit/dev-ipcrender
Add `ipcRrenderer.on` to `exposeInMainWorld.ipcRenderer` for this use in Renderer-process.
This commit is contained in:
commit
eb09eac617
@ -13,5 +13,10 @@ domReady().then(() => {
|
||||
|
||||
// --------- Expose some API to Renderer process. ---------
|
||||
contextBridge.exposeInMainWorld('fs', fs)
|
||||
contextBridge.exposeInMainWorld('ipcRenderer', ipcRenderer)
|
||||
contextBridge.exposeInMainWorld('removeLoading', removeLoading)
|
||||
contextBridge.exposeInMainWorld('ipcRenderer', {
|
||||
...ipcRenderer,
|
||||
on(...args: Parameters<IpcRenderer['on']>) {
|
||||
return ipcRenderer.on(...args)
|
||||
}
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user