Created
August 20, 2016 17:19
-
-
Save caionorder/9b0205ae5dae5da47fbb80bd0a421dd0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {app, BrowserWindow} = require('electron') | |
let win | |
function createWindow(){ | |
win = new BrowserWindow({ | |
width:800, | |
height:600 | |
}); | |
win.loadURL(`file://${__dirname}/index.html`) | |
win.on('closed', ()=>{ | |
win = null; | |
}) | |
win.webContents.on('devtools-opened', () => { | |
win.webContents.closeDevTools(); | |
}) | |
} | |
app.on('ready', createWindow) | |
app.on('all-window-closed', () =>{ | |
app.quit(); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment