📜  electronjs ipc 不起作用 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:27.045000             🧑  作者: Mango

代码示例1
//index
mainWindow.webContents.on('did-finish-load', () => {
      mainWindow.webContents.send('test','This is a test');
    })
//render

ipcRenderer.on('test', (evt,data) => {
     ipcRenderer.emit('end',true);
})