rem: parentNode.insertBefore(menuitem, target.firstChild); 
add: parentNode.insertBefore(menuitem, target.firstChild); 
context:   createPopupHeader: function (aEvent)  {    const kXULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";    const target = aEvent.target;    var parentNode = target.localName == "menupopup" ? target : target.firstChild;    // Don't create a separator for an empty folder,    if (target.localName == "menu") {      parentNode = document.createElementNS(kXULNS, "menupopup");      target.appendChild(parentNode);      var bo = target.boxObject.QueryInterface(Components.interfaces.nsIMenuBoxObject);      bo.openMenu(true);    }    if (parentNode.firstChild &&         parentNode.firstChild.getAttribute("x-generated") == "true") {      // clear out cruft.       parentNode.removeChild(target.firstChild);      parentNode.removeChild(target.firstChild);    }    var menuseparator = document.createElementNS(kXULNS, "menuseparator");    menuseparator.setAttribute("x-generated", "true");    parentNode.insertBefore(menuseparator, target.firstChild);    var menuitem = document.createElementNS(kXULNS, "menuitem");    const kRDF = gBookmarksShell.RDF;    const kNameArc = kRDF.GetResource(NC_NS + "Name");    var uri = NODE_ID(target.localName == "menupopup" ? target.parentNode : target);    var nameVal;    var str;    if (uri == "NC:BookmarksRoot") {      str = gBookmarksShell.getLocaleString("bookmarks_root")      const kProfileContractID = "@mozilla.org/profile/manager;1";      const kProfileIID = Components.interfaces.nsIProfile;      const kProfile = Components.classes[kProfileContractID].getService(kProfileIID);      nameVal = str.replace(/%user_name%/, kProfile.currentProfile);    }    else {      const kSrc = kRDF.GetResource(uri);      const kBMDS = kRDF.GetDataSource("rdf:bookmarks");      nameVal = kBMDS.GetTarget(kSrc, kNameArc, true);      nameVal = nameVal.QueryInterface(Components.interfaces.nsIRDFLiteral).Value;    }    str = gBookmarksShell.getLocaleString("file_in");    str = str.replace(/%folder_name%/, nameVal);    menuitem.setAttribute("folder-uri", uri);    menuitem.setAttribute("value", str);    menuitem.setAttribute("x-generated", "true");    parentNode.insertBefore(menuitem, target.firstChild);        menuitem.addEventListener("command", fileButton.fileBookmarks, false);  },
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/0b2dd2b2d2fd037df917e07645fa019a963332a5/bookmarks.js/clean/xpfe/components/bookmarks/resources/bookmarks.js