使用案例
//全局
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 }) } }