Created
December 20, 2018 10:47
-
-
Save hygull/d5902c0e3f9771220f9f70596ef81944 to your computer and use it in GitHub Desktop.
NW.js - Resizing window while starting the app
This file contains 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
// Entry point of the application | |
// https://github.com/nwjs/nw.js/issues/6308 | |
nw.Window.open('./src/views/index.html', { | |
position: 'center', | |
width: 1000, | |
height: 600, | |
frame: true | |
}, function(win) { | |
// log the width / height = 1366 / 768 | |
if(typeof win !== 'undefined'){ | |
win.on('closed', function() { | |
console.log('Generator app closed'); | |
}); | |
win.on('loaded', function() { | |
console.log("Generator app started") | |
win.focus(); | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment