add:  initConsoleListener(); 
context: function Startup()  {    window.XULBrowserWindow = new nsXULBrowserWindow();    //  TileWindow();    // Make sure window fits on screen initially    //FitToScreen();	    // Create the browser instance component.    createBrowserInstance();    	window.content.appCore= appCore;    if (appCore == null) {        // Give up.        window.close();    }    // Initialize browser instance..    appCore.setWebShellWindow(window);    		// give urlbar focus so it'll be an active editor and d&d will work properly		var url_bar = document.getElementById("urlbar");		if ( url_bar )      url_bar.focus();    // set the offline/online mode    setOfflineStatus();        tryToSetContentWindow();	    // Add a capturing event listener to the content area    // (rjc note: not the entire window, otherwise we'll get sidebar pane loads too!)    //  so we'll be notified when onloads complete.    var contentArea = document.getElementById("appcontent");    if (contentArea)    {	    contentArea.addEventListener("load", UpdateBookmarksLastVisitedDate, true);	    contentArea.addEventListener("load", UpdateInternetSearchResults, true);      contentArea.addEventListener("load", getContentAreaFrameCount, true);      contentArea.addEventListener("focus", contentAreaFrameFocus, true);    }    dump("*** Pulling out the charset\n");    if ( window.arguments && window.arguments[1] ) {        if (window.arguments[1].indexOf('charset=') != -1) {              arrayArgComponents = window.arguments[1].split('=');            if (arrayArgComponents) {                if (appCore != null) {                 //we should "inherit" the charset menu setting in a new window                  appCore.SetDocumentCharset(arrayArgComponents[1]);                }                 dump("*** SetDocumentCharset(" + arrayArgComponents[1] + ")\n");            }        }    }    try    {    	var searchMode = pref.GetIntPref("browser.search.mode");    	setBrowserSearchMode(searchMode);    }    catch(ex)    {    }	 // Check for window.arguments[0].  If present, go to that url.    if ( window.arguments && window.arguments[0] ) {        // Load it using yet another psuedo-onload handler.        onLoadViaOpenDialog();    }    gURLBar = document.getElementById("urlbar");        // set home button tooltip text    var homepage;     try {      homepage = pref.CopyUnicharPref("browser.startup.homepage");    }    catch(e) {      homepage = null;    }    if (homepage)      setTooltipText("homebutton", homepage);  }
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/a6234be1db02b16ff876d82b5e6d0d2bde90b66d/navigator.js/buggy/suite/browser/navigator.js