function undoClosedWindow(controller, event)
{
  var count = sessionStoreService.getClosedWindowCount(controller.window);

  switch (event.type) {
    case "menu":
      throw new Error("Menu gets build dynamically and cannot be accessed.");
      break;
    case "shortcut":
      var cmdKey = utils.getEntity(this.getDtds(), "newNavigatorCmd.key");
      controller.keypress(null, cmdKey, {accelKey: true, shiftKey: true});
      break;
  }

  if (count > 0)
    controller.assertJS("subject.newWindowCount < subject.oldWindowCount",
                        {
                         newWindowCount : sessionStoreService.getClosedWindowCount(controller.window),
                         oldWindowCount : count
                        });
}
function undoClosedWindow(controller, event)
{
  var count = sessionStoreService.getClosedWindowCount(controller.window);

  switch (event.type) {
    case "menu":
      throw new Error("Menu gets build dynamically and cannot be accessed.");
      break;
    case "shortcut":
      var cmdKey = utils.getEntity(this.getDtds(), "newNavigatorCmd.key");
      controller.keypress(null, cmdKey, {accelKey: true, shiftKey: true});
      break;
  }

  if (count > 0)
    controller.assertJS("subject.newWindowCount < subject.oldWindowCount",
                        {
                         newWindowCount : sessionStoreService.getClosedWindowCount(controller.window),
                         oldWindowCount : count
                        });
}
function undoClosedWindow ( controller , event ) { var count = sessionStoreService . getClosedWindowCount ( controller . window ) ; switch ( event . type ) { case "menu" : throw new Error ( "Menu gets build dynamically and cannot be accessed." ) ; break ; case "shortcut" : var cmdKey = utils . getEntity ( this . getDtds ( ) , "newNavigatorCmd.key" ) ; controller . keypress ( null , cmdKey , { accelKey : true , shiftKey : true } ) ; break ; } if ( count > 0 ) controller . assertJS ( "subject.newWindowCount < subject.oldWindowCount" , { newWindowCount : sessionStoreService . getClosedWindowCount ( controller . window ) , oldWindowCount : count } ) ; }
Restores the window which has been recently closed

@param {MozMillController} controller
MozMillController of the window to operate on
@param {object} event
Specifies the event to use to execute the command
Restores the window which has been recently closed
Undo a closed window