Reputation: 25
I am wondering how to minimize the window. The documentation is kinda confusing. Closing the window is no problem but minimizing won't work this way:
document.getElementById('close').addEventListener('click', function() {
window.close();
}, false);
The same goes for this method:
var gui = require('nw.gui');
var win = gui.Window.get();
document.getElementById('minimize').addEventListener('click', function() {
win.window.minimize(); }, false);
What am I doing wrong?
Upvotes: 2
Views: 2284
Reputation: 659
As per the documentation in https://github.com/rogerwang/node-webkit/wiki/Window#wiki-windowminimize call
win.minimize();
instead
Upvotes: 4