rem: function loadDomViewer(){ if(window.opener != null){       newRoot  = window.opener.newRoot;  if (newRoot==null) newRoot = window.opener.document;  document.writeln(displayDOM(newRoot)); document.close(); }else{ newRoot = parent.document.all['myiframe'].contentWindow.document; newRoot.writeln(displayDOM(newRoot)); newRoot.close(); } 
add: function loadDomViewer() {  var rootDocument = window.rootDocument;   if (!rootDocument && window.opener) { rootDocument = window.opener.rootDocument || window.opener.document; }  if (rootDocument) { document.body.innerHTML = displayDOM(rootDocument); } else { document.body.innerHTML = "<b>Must specify rootDocument for window. This can be done by setting the rootDocument variable on this window, or on the opener window for a popup window.</b>"; } 
context: function loadDomViewer(){	if(window.opener != null){		//Open in a new window. 		// Start with specified root object.		// It should be defined as a "newRoot" variable 		// in the tested page. Could be any element in 		// the DOM structure of the page that opened it.		// Default to document if no object is specified.		newRoot  = window.opener.newRoot;			if (newRoot==null)			newRoot = window.opener.document;			document.writeln(displayDOM(newRoot));		document.close();	}else{		newRoot = parent.document.all['myiframe'].contentWindow.document;		newRoot.writeln(displayDOM(newRoot));		newRoot.close();	}}
meta: 3175	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3175/3baeb0d7ff7e142f629ebf21bc7ddc8e0fc4fe55/selenium-domviewer.js/buggy/code/javascript/selenium-domviewer.js