Skip to content

Instantly share code, notes, and snippets.

@hygull
Created December 20, 2018 10:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hygull/d5902c0e3f9771220f9f70596ef81944 to your computer and use it in GitHub Desktop.
Save hygull/d5902c0e3f9771220f9f70596ef81944 to your computer and use it in GitHub Desktop.
NW.js - Resizing window while starting the app
// 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