rem: while (tree.selectedItems.length > 0) { var selectedNode = tree.selectedItems[0]; 
add: while (listbox.selectedItems.length > 0) { var selectedNode = listbox.selectedItems[0]; dump(selectedNode + " - " + listbox.selectedItems.length + "\n"); 
context: function RemoveActiveCharset(){  var active_charsets_treeroot = document.getElementById('active_charsets_root');  var tree = document.getElementById('active_charsets');  var nextNode = null;  var numSelected = tree.selectedItems.length;  var deleted_all = false;  while (tree.selectedItems.length > 0) {    var selectedNode = tree.selectedItems[0];    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);    active_charsets_treeroot.removeChild(selectedNode);  } //while  if (nextNode) {    tree.selectItem(nextNode)  } else {    //tree.clearSelection();  }  enable_save();} //RemoveActiveCharset
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/d38a0937d9c93a0a9d913e2ac781e4328bb8cc73/pref-charset.js/clean/xpfe/components/prefwindow/resources/content/pref-charset.js