Created
December 20, 2018 10:47
-
-
Save hygull/311d069535462a6156fa16ce524e10bc 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