third_party/js/mozmill/shared-modules/tabview.js
function tabView_waitForClosed() {
    // Add event listener to wait until the tabview has been closed
    var self = { closed: false };
    function checkClosed() { self.closed = true; }
    this._controller.window.addEventListener("tabviewhidden", checkClosed, false);

    try {
      mozmill.utils.waitFor(function() {
        return self.closed == true;
      }, TIMEOUT, 100, "TabView is still open.");
    } finally {
      this._controller.window.removeEventListener("tabviewhidden", checkClosed, false);
    }

    this._tabViewObject = null;
    this._groupItemsObject = null;
    this._tabItemsObject = null;
  }
function tabView_waitForClosed() {
    // Add event listener to wait until the tabview has been closed
    var self = { closed: false };
    function checkClosed() { self.closed = true; }
    this._controller.window.addEventListener("tabviewhidden", checkClosed, false);

    try {
      mozmill.utils.waitFor(function() {
        return self.closed == true;
      }, TIMEOUT, 100, "TabView is still open.");
    } finally {
      this._controller.window.removeEventListener("tabviewhidden", checkClosed, false);
    }

    this._tabViewObject = null;
    this._groupItemsObject = null;
    this._tabItemsObject = null;
  }
function tabView_waitForClosed ( ) { // Add event listener to wait until the tabview has been closed var self = { closed : false } ; function checkClosed ( ) { self . closed = true ; } this . _controller . window . addEventListener ( "tabviewhidden" , checkClosed , false ) ; try { mozmill . utils . waitFor ( function ( ) { return self . closed == true ; } , TIMEOUT , 100 , "TabView is still open." ) ; } finally { this . _controller . window . removeEventListener ( "tabviewhidden" , checkClosed , false ) ; } this . _tabViewObject = null ; this . _groupItemsObject = null ; this . _tabItemsObject = null ; }
Wait until the Tab View has been closed
Wait until the Tab View has been closed