function createWindow()

in MiddlemanElectronSampleApp/Electron/main.js [8:33]


function createWindow () {
    // Create the browser window.
    win = new BrowserWindow
        ({
            width: 800, height: 600,
            webPreferences: {
                preload: path.join(__dirname, 'preload.js'),
                nodeIntegration: true,
                contextIsolation: false
            }
        })

    // and load the index.html of the app.
    win.loadFile('index.html')

    // Open the DevTools.
 //  win.webContents.openDevTools()

    // Emitted when the window is closed.
    win.on('closed', () => {
        // Dereference the window object, usually you would store windows
        // in an array if your app supports multi windows, this is the time
        // when you should delete the corresponding element.
        win = null
    })
}