Dustin Angeletti
Dustin Angeletti

Reputation: 57

How do i minimize node-webkit window to taskbar?

enter image description here

<div name="ControlDiv-1" id="ControlDiv-1" class="ControlDiv-1" onclick="javascript: window.close()"> </div>

That obviously closes that window, but How can I do the same thing and minimize the window instead of close. I looked at the documentation and I found window.min() but I cannot get it to work. It creates and error instead of minimizing.

Upvotes: 1

Views: 732

Answers (2)

ahmad adel
ahmad adel

Reputation: 17

Actually this worked for me:

var win = gui.Window.get();
win.setShowInTaskbar(true);
win.minimize();

Upvotes: 0

Dhiraj
Dhiraj

Reputation: 33618

To minimize node-webkit app to task bar, AFAIK you have to do two things

window.hide()

window.setShowInTaskbar(true);

Upvotes: 4

Related Questions