add: row.removeChild(cell); selectedNode.removeChild(row); directoriesTree_root.removeChild(selectedNode); if (nextNode) { directoriesTree.selectItem(nextNode) } 
context: function removeDirectory(){  var directoriesTree = document.getElementById("directoriesTree");  var directoriesTree_root = document.getElementById("directoriesTree_root");  var selectedNode = directoriesTree.selectedItems[0];      var nextNode = selectedNode.nextSibling;  if (!nextNode)    if (selectedNode.previousSibling)      nextNode = selectedNode.previousSibling;  var row  =  selectedNode.firstChild;  var cell =  row.firstChild;  row.removeChild(cell);  selectedNode.removeChild(row);  directoriesTree_root.removeChild(selectedNode);  if (nextNode) {    directoriesTree.selectItem(nextNode)  }   if(gCurrentDirectoryServer && gCurrentDirectoryServerId) {    if(!gPrefInt) {       try {        gPrefInt = Components.classes["@mozilla.org/preferences;1"];        gPrefInt = gPrefInt.getService(Components.interfaces.nsIPref);      }      catch (ex) {        gPrefInt = null;      }    }    gPrefInt.DeleteBranch(gCurrentDirectoryServerId);  }  window.opener.gRefresh = true;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/de3db96da9e3d0282deeca162036df317b235a04/pref-directory.js/clean/mailnews/addrbook/prefs/resources/content/pref-directory.js