add: wrapPaletteItem(templateNode, currentRow, null);   templateNode = document.createElementNS("http: "splitter"); templateNode.id = "splitter"; 
context: function buildPalette(){  // Empty the palette first.  var paletteBox = document.getElementById("palette-box");  while (paletteBox.lastChild)    paletteBox.removeChild(paletteBox.lastChild);  var currentRow = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",                                            "hbox");  currentRow.setAttribute("class", "paletteRow");  // Add the toolbar separator item.  var templateNode = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",                                              "toolbarseparator");  templateNode.id = "separator";  wrapPaletteItem(templateNode, currentRow, null);  // Add the toolbar spring item.  templateNode = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",                                              "toolbarspring");  templateNode.id = "spring";  templateNode.flex = 1;  wrapPaletteItem(templateNode, currentRow, null);  // Add the toolbar spacer item.  templateNode = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",                                              "toolbarspacer");  templateNode.id = "spacer";  templateNode.flex = 1;  wrapPaletteItem(templateNode, currentRow, null);  var rowSlot = 3;  var currentItems = getCurrentItemIds();  templateNode = gToolbox.palette.firstChild;  while (templateNode) {    // Check if the item is already in a toolbar before adding it to the palette.    if (!(templateNode.id in currentItems)) {      var paletteItem = templateNode.cloneNode(true);      if (rowSlot == kRowMax) {        // Append the old row.        paletteBox.appendChild(currentRow);        // Make a new row.        currentRow = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",                                              "hbox");        currentRow.setAttribute("class", "paletteRow");        rowSlot = 0;      }      ++rowSlot;      wrapPaletteItem(paletteItem, currentRow, null);    }        templateNode = templateNode.nextSibling;  }  if (currentRow) {     fillRowWithFlex(currentRow);    paletteBox.appendChild(currentRow);  }}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/8395/8d4874280c341c2a77aec42af90a5717fb7c39d2/customizeToolbar.js/buggy/toolkit/content/customizeToolbar.js