chore: add comment

This commit is contained in:
草鞋没号 2021-11-26 08:53:19 +08:00
parent eb09eac617
commit 61599b0644

View File

@ -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)
}