rem: try {  window.setTimeout( "window.close();", 2000 ); } catch ( exception ) {  window.close();  dialog.cancel.childNodes[0].nodeValue = "Close"; } 
add: var percentMsg = getString( "percentMsg" ); percentMsg = replaceInsert( percentMsg, 1, 100 ); dialog.progressText.setAttribute("value", percentMsg);  processEndOfDownload(); 
context:     onStateChange: function(aWebProgress, aRequest, aStateFlags, aStatus)    {      if (aStateFlags & Components.interfaces.nsIWebProgressListener.STATE_STOP)      {        // we are done downloading...        completed = true;        // Indicate completion in status area.        var msg = getString( "completeMsg" );        msg = replaceInsert( msg, 1, formatSeconds( elapsed/1000 ) );        dialog.status.setAttribute("value", msg);        // Put progress meter at 100%.        dialog.progress.setAttribute( "value", 100 );        dialog.progress.setAttribute( "mode", "normal" );        try {          // Close the window in 2 seconds (to ensure user sees we're done).          window.setTimeout( "window.close();", 2000 );        }         catch ( exception )         {          // OK, try to just close the window immediately.          window.close();          // If that's not working either, change button text to give user a clue.          dialog.cancel.childNodes[0].nodeValue = "Close";        }      }    },
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/e95bc5292e900df5d11b32636e6eedb3ac76e9d5/helperAppDldProgress.js/clean/xpfe/components/ucth/resources/helperAppDldProgress.js