Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const {app, BrowserWindow} = require('electron');
- const path = require('path');
- const url = require('url');
- let win;
- function createWindow(){
- win = new BrowserWindow({width:1300, height:900});
- // Load window:
- win.loadURL(url.format({
- pathname: path.join(__dirname, 'index.html'),
- protocol: 'file',
- slashes: true
- }));
- win.on('closed', () =>{
- win = null;
- });
- }
- // Run the window
- app.on('ready', createWindow);
- // Quit when all windows are closed
- app.on('window-all-closed', () => {
- if(process.platform !== 'darwin'){
- app.quit();
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement