【发布时间】:2020-11-11 23:31:16
【问题描述】:
所以我有这段代码,并且 arg 是从 Main 发送过来的。
ipcRenderer.send('asynchronous-message', 'async ping')
ipcRenderer.on('asynchronous-reply', (event, arg) => {
console.log(arg);
});
我希望能够在 ipcRenderer 函数之外使用 arg,但我无法将其取出。 这甚至可能吗?如果可以,那怎么办?提前致谢。
【问题讨论】:
标签: electron ipc ipcrenderer ipcmain