Tags
Asked 11 days ago
10 Jan 2018
Views 34
angeo

angeo posted

electron JS : ready-to-show method is not running at all




onst {app, BrowserWindow} = require('electron');

function createWindow () {
    // Create the browser window.
    win = new BrowserWindow({width: 800, height: 600});

    // Emitted when the window is closed.
    win.on('closed', () => {
        console.log('closed!');
        win = null
    })

  mainWindow.once('ready-to-show', () => {
  console.log("mainwindow starting now ");
 
    mainWindow.show();
  });

    // and load the url of the app.
    win.loadURL('https://www.google.com');
}

app.on('ready', createWindow);
Post Answer