rem: selectedItem.parentNode.removeChild(selectedItem); 
add: profileList.removeChild(selectedItem); if (profileList.firstChild != undefined) { profileList.selectItem(profileList.firstChild); } 
context: function ConfirmDelete(){  var deleteButton = document.getElementById("delbutton");  var profileList = document.getElementById( "profiles" );  var selectedItem = profileList.selectedItem;  if (!selectedItem) {    return false;  }  var selectedProfile = selectedItem.profile;  var deleteFiles = false;  if (selectedProfile.rootDir.exists()) {    var dialogTitle = gProfileManagerBundle.getString("deleteTitle");    var dialogText =      gProfileManagerBundle.getFormattedString("deleteProfileConfirm",                                               [selectedProfile.rootDir.path]);    var buttonPressed = gPromptService.confirmEx(window, dialogTitle, dialogText,                          (gPromptService.BUTTON_TITLE_IS_STRING * gPromptService.BUTTON_POS_0) +                          (gPromptService.BUTTON_TITLE_CANCEL * gPromptService.BUTTON_POS_1) +                          (gPromptService.BUTTON_TITLE_IS_STRING * gPromptService.BUTTON_POS_2),                          gProfileManagerBundle.getString("dontDeleteFiles"),                          null,                          gProfileManagerBundle.getString("deleteFiles"),                          null, {value:0});    if (buttonPressed == 1)      return false;    if (buttonPressed == 2)      deleteFiles = true;  }    selectedProfile.remove(deleteFiles);  selectedItem.parentNode.removeChild(selectedItem);  return true;}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/8395/d70d5ee2692c33f9c84434638e466bbaecb39004/profileSelection.js/clean/toolkit/profile/content/profileSelection.js