var window = wm.createWindow({ title: 'A new window', events: { open: function() { console.log('The window was open'); }, closed: function() { console.log('The window ...