rem: window.setTimeout( "window.close();", 2000 ); 
add:       dialog.cancel.childNodes[0].nodeValue = "Close"; window.close(); dump( "Close still not working right!\n" ); 
context: function onCompletion( status ) {    // Note that we're done (and can ignore subsequent progress notifications).    completed = true;    // Indicate completion in status area.    onStatus( "Download completed in " + formatSeconds( elapsed/1000 ) );    // 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 ) {        dump( "Error setting close timeout\n" );        for ( prop in exception ) {            dump( "exception." + prop + "=" + exception[ prop ] + "\n" );        }        // Bug prevents that from working, just close the window.        window.close();        // If that's not working either, change button text to give user a clue.        dialog.cancel.childNodes[0].nodeValue = "Close";    }}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/4c6d1eb90a06733d91084861109a8144106859bb/downloadProgress.js/buggy/xpfe/components/xfer/resources/downloadProgress.js