Pregunta

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?

¿Fue útil?

Solución

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

win.minimize();

instead

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top