fix(app): support additional arguments on messages
This commit is contained in:
@ -13,8 +13,8 @@ const { ipcRenderer, remote } = require('electron');
|
|||||||
window.torrentSocket = {}
|
window.torrentSocket = {}
|
||||||
window.torrentSocket.callbacks = {}
|
window.torrentSocket.callbacks = {}
|
||||||
window.torrentSocket.on = (name, func) => {
|
window.torrentSocket.on = (name, func) => {
|
||||||
ipcRenderer.on(name, (event, data) => {
|
ipcRenderer.on(name, (event, ...data) => {
|
||||||
func(data)
|
func(...data)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
window.torrentSocket.off = (name, func) => {
|
window.torrentSocket.off = (name, func) => {
|
||||||
|
Reference in New Issue
Block a user