Attach did-finish-load event to win.webContents instead of win

This commit is contained in:
Alex Liebowitz 2017-05-08 05:22:38 -04:00
parent ef4274012f
commit 2761ebbd92

View file

@ -114,11 +114,12 @@ function getPidsForProcessName(name) {
function createWindow () {
win = new BrowserWindow({backgroundColor: '#155B4A', minWidth: 800, minHeight: 600 }) //$color-primary
win.maximize()
// win.webContents.openDevTools();
win.loadURL(`file://${__dirname}/dist/index.html`)
if (openUri) { // We stored and received a URI that an external app requested before we had a window object
win.on('did-finish-load', () => {
win.webContents.on('did-finish-load', () => {
win.webContents.send('open-uri-requested', openUri);
});
}