rem: var treechildren = tree.firstChild; if (!treechildren) { treechildren = document.createElementNS("http: if (treechildren) tree.appendChild(treechildren); else { dump("Failed to create <treechildren>\n"); return null; } } 
add: var treechildren = document.getElementById('child');  
context: function AppendStringToTreelist(tree, string){  if (tree)  {    var treechildren = tree.firstChild;    if (!treechildren)    {      treechildren = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "treechildren");      if (treechildren)        tree.appendChild(treechildren);      else      {        dump("Failed to create <treechildren>\n");        return null;      }    }    var treeitem = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "treeitem");    var treerow = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "treerow");    var treecell = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "treecell");    if (treeitem && treerow && treecell)    {      treerow.appendChild(treecell);      treeitem.appendChild(treerow);      treechildren.appendChild(treeitem)      treecell.setAttribute("value", string);      var len = Number(tree.getAttribute("length"));      if (!len) len = -1;      tree.setAttribute("length",len+1);      return treeitem;    }  }  return null;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/d0d7026db678390d7f2e94335cdf76e9ad5a64da/selectDialog.js/clean/xpfe/global/resources/content/selectDialog.js