System Tray Item click not working on windows using nodejs

46 views Asked by At

In Windows OS function associated with item should be executed when Item of tray is clicked.

I have created tray and menu using NW and after that added items in it. But when I run application on Windows only tray and menu item are visible function written on click is not giving any output. I have tried following code

var tray = new NW. Tray({title: 'Tray Name', icon: 'icon Path'})
var menu = new nw.Menu()
menu.append({label: "label1", click: function () {//code})
menu.append({label: "label2", click: function () {//code})
tray.menu = menu

I have also tried using menu.click() separate for each menu but it is not working.

0

There are 0 answers