我遇到一个问题,每次创建新的远程浏览器窗口时,都会刷新当前打开的每个电子窗口。 例如,我有一个执行某些提取请求和加载动画的主窗口。加载信息后,用户单击按钮打开另一个窗口,将重新加载主窗口。我该如何阻止呢?
const BrowserWindow = remote.BrowserWindow;
let win = new BrowserWindow({
height: 500,
width: 600,
parent: this.currWin,
webPreferences: {
nodeIntegration: true
},
show: false,
resizable: false
});
win.setMenu(null);
win.on('closed', function () {
win = null;
});
win.loadFile('dist/windows/details.html');
win.webContents.on('did-finish-load', () => win.show());