remote渲染进程与主进程通信方法

官方文档

窗口通信博文

使用案例

//全局
const
btn = this.document.querySelector('#btn') const BrowserWindow = require('electron').remote.BrowserWindow window.onload = function () { btn.onclick = () => { newWin = new BrowserWindow({ 500, height: 500 }) newWin.loadFile('./html/yellow.html') newWin.on('closed', () => { newWin = null }) } }
原文地址:https://www.cnblogs.com/fwjlucifinil/p/13535171.html