mirror of
https://github.com/electron-vite/electron-vite-vue
synced 2025-01-19 11:56:36 +08:00
chore: add comment
This commit is contained in:
parent
eb09eac617
commit
61599b0644
@ -1,5 +1,5 @@
|
||||
import fs from 'fs'
|
||||
import { contextBridge, ipcRenderer } from 'electron'
|
||||
import { contextBridge, ipcRenderer, IpcRenderer } from 'electron'
|
||||
import { domReady } from './utils'
|
||||
import { useLoading } from './loading'
|
||||
|
||||
@ -16,6 +16,7 @@ contextBridge.exposeInMainWorld('fs', fs)
|
||||
contextBridge.exposeInMainWorld('removeLoading', removeLoading)
|
||||
contextBridge.exposeInMainWorld('ipcRenderer', {
|
||||
...ipcRenderer,
|
||||
// `exposeInMainWorld` will not expose attribute and mothods from the prototype
|
||||
on(...args: Parameters<IpcRenderer['on']>) {
|
||||
return ipcRenderer.on(...args)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user