【发布时间】:2019-02-11 18:37:28
【问题描述】:
我想将一个对象从前端窗口发送到电子端。 我试过这个:
html:
const ipcRender = require('electron').ipcRenderer;
ipcRender.send('test', { test: null});
节点:
mainWindow.webContents.on('test', (event, data) => {
console.log(true);
console.log(data);
});
并没有在控制台中看到任何内容。有什么问题? 谢谢!
【问题讨论】: