Add ipcRenderer send function to preload
This commit is contained in:
parent
cef92243f5
commit
6056504f00
1 changed files with 5 additions and 0 deletions
|
@ -4,6 +4,11 @@ const removeAllListeners = (channel: string) => {
|
|||
ipcRenderer.removeAllListeners(channel);
|
||||
};
|
||||
|
||||
const send = (channel: string, ...args: any[]) => {
|
||||
ipcRenderer.send(channel, ...args);
|
||||
};
|
||||
|
||||
export const ipc = {
|
||||
removeAllListeners,
|
||||
send,
|
||||
};
|
||||
|
|
Reference in a new issue