rem: labelsNode.removeChildNodes(); 
add: removeChildNodes(labelsNode); 
context: function refreshBufferList(n, src) {    // display only the current buffer (textarea)    // show labels for each buffer    // short-circuit if the buffer doesn't exist    if (getBuffer(n) == null)        return;    // labels are stored in divs in a table cell    var labelsNode = document.getElementById(g_cq_bufferlist_id);    labelsNode.removeChildNodes();    // create an explicit tbody for the DOM (Mozilla needs this)    var tableBody = document.createElement('tbody');    labelsNode.appendChild(tableBody);    // 0 will return false, will set to 0: ok    if (n == null) {        if (g_cq_buffer_current == null) {            n = g_cq_buffer_current;        } else {            n = 0;        }    }    g_cq_buffer_current = n;    debug.print("refreshBufferList: from " + src + ", show " + g_cq_buffer_current);    // parent of all the textareas    var theParent = document.getElementById(g_cq_buffers_area_id);    // childNodes.length will return some non-buffer elements, too!    var theBuffer = null;    for (var i = 0; i < theParent.childNodes.length; i++) {        //debug.print("refreshBufferList: i = " + i + " of " + theParent.childNodes.length);        theBuffer = getBuffer(i);        // not there? skip it        if (theBuffer != null) {          writeBufferLabel(tableBody, i);          theBuffer.hide();          // set up handlers to update line-number display          if (! theBuffer.onfocus)              theBuffer.onfocus = setLineNumberStatus;          if (! theBuffer.onclick)              theBuffer.onclick = setLineNumberStatus;          if (! theBuffer.onkeyup)              theBuffer.onkeyup = setLineNumberStatus;        }    } // for buffers    // show the current buffer only, and put the cursor there    getBuffer().show();    focusQueryInput();} // refreshBufferList
meta: 952	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/6b355f08875fd342ed1dc304b04eaed9f1da1046/cq.js/buggy/cq.js