rem: doc.open("text/html", "replace"); doc.writeln( html ); doc.close(); 
add: if (doc) { doc.open("text/html", "replace"); doc.writeln( html ); doc.close(); } 
context: function doEngineClick( event, aNode ){	if (event.button != 1)		return(false);	var html = null;	var resultsTree = document.getElementById("internetresultstree");	var contentArea = document.getElementById("content");	var splitter = document.getElementById("gray_horizontal_splitter");	var engineURI = aNode.getAttribute("id");	if (engineURI == "allEngines")	{		resultsTree.setAttribute("style", "display: table;");		splitter.setAttribute("style","display: block;");		contentArea.setAttribute("style", "height: 100; width: 100%;");	}	else	{		resultsTree.setAttribute("style", "display: none;");		splitter.setAttribute("style","display: none");		contentArea.setAttribute("style", "height: 100%; width: 100%;");		try		{			var rdf = Components.classes["component://netscape/rdf/rdf-service"].getService();			if (rdf)   rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService);			if (rdf)			{				var internetSearchStore = rdf.GetDataSource("rdf:internetsearch");				if (internetSearchStore)				{					var src = rdf.GetResource(engineURI, true);					var htmlProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#HTML", true);					html = internetSearchStore.GetTarget(src, htmlProperty, true);					if ( html )	html = html.QueryInterface(Components.interfaces.nsIRDFLiteral);					if ( html )	html = html.Value;				}			}		}		catch(ex)		{		}	}	if ( html )	{		var doc = window.frames[0].document;		doc.open("text/html", "replace");		doc.writeln( html );		doc.close();	}	else	{		window.frames[0].document.location = "chrome://communicator/content/search/default.htm";	}}
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/ba7cb60ef79f944da51c6fa6e8ce1fb183696c74/internetresults.js/clean/suite/common/search/internetresults.js