user3258048
user3258048

Reputation: 25

Node-Webkit: How to minimize the window?

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

Answers (1)

Txangel
Txangel

Reputation: 659

As per the documentation in https://github.com/rogerwang/node-webkit/wiki/Window#wiki-windowminimize call

win.minimize();

instead

Upvotes: 4

Related Questions