rem: while (menulist.firstChild) menulist.removeChild(menulist.firstChild); 
add: var popup = menulist.firstChild; if (popup) while (popup.firstChild) popup.removeChild(popup.firstChild); 
context: function ClearMenulist(menulist){  // There is usually not more than 1 menupopup under a menulist,  //  but look for > 1 children anyway.  // Note -- this doesn't remove menuitems from the menupopop -- SHOULD WE?  if (menulist) {    menulist.selectedItem = null;    while (menulist.firstChild)      menulist.removeChild(menulist.firstChild);  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/a8e5c0b7bcf6def29348bdc1fb448239fd223bd2/EdDialogCommon.js/buggy/editor/ui/dialogs/content/EdDialogCommon.js