Skip to content

Commit

Permalink
app: Add removeListener to desktopApi
Browse files Browse the repository at this point in the history
this patch adds removeListener to desktopApi
for removing the listener.

Signed-off-by: yolossn <sannagaraj@microsoft.com>
  • Loading branch information
yolossn committed Jul 1, 2024
1 parent 84bf0ea commit d32ed7d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/electron/preload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,8 @@ contextBridge.exposeInMainWorld('desktopApi', {
ipcRenderer.on(channel, (event, ...args) => func(...args));
}
},

removeListener: (channel, func) => {
ipcRenderer.removeListener(channel, func);
},
});

0 comments on commit d32ed7d

Please sign in to comment.