Assuming the below function is called multiple times to create BrowserWindow, say 5 times.
let mainWindow;
function createWindow() {
"use strict";
mainWindow = new BrowserWindow({
height: height,
width: width,
minHeight: height,
minWidth: width,
icon: __dirname + iconPath,
frame: false,
backgroundColor: '#FFF',
show: false
});
mainWindow.loadURL(url.format({
pathname: path.join(__dirname, address),
protocol: 'file',
slashes: true
}));
mainWindow.once('ready-to-show', () => {
mainWindow.show();
mainWindow.focus();
});
mainWindow.on('closed', () => {
mainWindow = null;
});
}
this will generate 5 different BrowserWindow.
Does BrowserWindow has it's own unique id to identify? Or can we assign a unique id on it so that we can access them using its own id?