rem: var m = undoPopup.appendChild(document.createElement("menuitem")); 
add: var m = document.createElement("menuitem"); 
context: HistoryMenu.populateUndoSubmenu = function PHM_populateUndoSubmenu() {  var undoPopup = document.getElementById("historyUndoPopup");  // remove existing menu items  while (undoPopup.hasChildNodes())    undoPopup.removeChild(undoPopup.firstChild);  // get closed-tabs from nsSessionStore  var ss = Cc["@mozilla.org/browser/sessionstore;1"].           getService(Ci.nsISessionStore);  // no restorable tabs, so make sure menu is disabled, and return  if (ss.getClosedTabCount(window) == 0) {    undoPopup.parentNode.setAttribute("disabled", true);    return;  }  // enable menu  undoPopup.parentNode.removeAttribute("disabled");  // populate menu  var undoItems = eval("(" + ss.getClosedTabData(window) + ")");  for (var i = 0; i < undoItems.length; i++) {    var m = undoPopup.appendChild(document.createElement("menuitem"));    m.setAttribute("label", undoItems[i].title);    if (undoItems[i].image)      m.setAttribute("image", undoItems[i].image);    m.setAttribute("class", "menuitem-iconic bookmark-item");    m.setAttribute("value", i);    m.setAttribute("oncommand", "undoCloseTab(" + i + ");");    m.addEventListener("click", undoCloseMiddleClick, false);  }  // "Open All in Tabs"  var strings = gNavigatorBundle;  undoPopup.appendChild(document.createElement("menuseparator"));  m = undoPopup.appendChild(document.createElement("menuitem"));  m.setAttribute("label", strings.getString("menuOpenAllInTabs.label"));  m.setAttribute("accesskey", strings.getString("menuOpenAllInTabs.accesskey"));  m.addEventListener("command", function() {    for (var i = 0; i < undoItems.length; i++)      undoCloseTab();  }, false);}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/10234/7cd8a5b5b4b99c858afcdbecafeb41162fec000b/browser.js/clean/browser/base/content/browser.js