node-webkit-window-manager
This is a utility to help manage all windows in a node-webkit application. It gives all open windows a global reference to other windows and allows passing data between windows.
Example
Instantiate the window manager and store as a global reference.
var WindowManager = windowManager; var gui = ; globalwindowManager = gui "login": // the name "key" of the window page: "html/login.html" // the path to the HTML page. options: // Standard nw.gui Window options frame : true toolbar: true width: 500 height: 600 show: true "dashboard": page:"html/dashboard.html" options: frame : true toolbar: true width: 900 height: 700 show: true "index": page:"html/index.html" options: frame: true toolbar: true width: 900 height: 700 show: true ;
Open the login page and pass a user object
var loginWindow = globalwindowManager;
On login.html, get reference to user object
var loginWindow = globalwindowManager; console; console;
Close the login window
globalwindowManager;
Close all opened windows, except the background page.
globalwindowManageropenWindows;