rem: while ( containerBox.childNodes.length ) containerBox.removeChild(containerBox.childNodes[0]); 
add: while ( containerBox.childNodes.length ) containerBox.removeChild(containerBox.childNodes[0]); 
context: function fillBoxWithAllHeaders(containerBox, boxPartOfPopup){  // clear out the old popup date if there is any...  while ( containerBox.childNodes.length )    containerBox.removeChild(containerBox.childNodes[0]);  for (header in currentHeaderData)  {    var innerBox = document.createElement('box');    innerBox.setAttribute("class", "headerBox");    innerBox.setAttribute("orient", "horizontal");    if (boxPartOfPopup)        innerBox.setAttribute("autostretch", "never");    // for each header, create a header value and header name then assign those values...    var headerValueBox = document.createElement('hbox');    headerValueBox.setAttribute("class", "headerValueBox");    var newHeaderTitle  = document.createElement('text');    newHeaderTitle.setAttribute("class", "headerdisplayname");    newHeaderTitle.setAttribute("value", currentHeaderData[header].headerName + ':');    headerValueBox.appendChild(newHeaderTitle);    innerBox.appendChild(headerValueBox);    var newHeaderValue = document.createElement('html');    // make sure we are properly resized...//    if (boxPartOfPopup)//        newHeaderValue.setAttribute("width", window.innerWidth*.65);    newHeaderValue.setAttribute("class", "headerValue");    if (!boxPartOfPopup)      newHeaderValue.setAttribute("flex", "1");    innerBox.appendChild(newHeaderValue);    containerBox.appendChild(innerBox);    ProcessHeaderValue(innerBox, newHeaderValue, currentHeaderData[header], boxPartOfPopup);  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/c67a0430b1f6a28483542ee1bfc4325f6249ad46/msgHdrViewOverlay.js/clean/mailnews/base/resources/content/msgHdrViewOverlay.js