rem: while (this._children.hasChildNodes()) this._children.removeChild(this._children.firstChild); 
add: while (this._view.hasChildNodes()) this._view.removeChild(this._view.firstChild); 
context:   onLoad: function() {    this._children = document.getElementById("historyChildren");        var um =         Components.classes["@mozilla.org/updates/update-manager;1"].        getService(Components.interfaces.nsIUpdateManager);    var uc = um.updateCount;    if (uc) {      while (this._children.hasChildNodes())        this._children.removeChild(this._children.firstChild);          for (var i = 0; i < uc; ++i) {        var update = um.getUpdateAt(i);                var treeitem = document.createElementNS(NS_XUL, "treeitem");        var treerow = document.createElementNS(NS_XUL, "treerow");        var nameCell = document.createElementNS(NS_XUL, "treecell");        nameCell.setAttribute("label", update.name);        var dateCell = document.createElementNS(NS_XUL, "treecell");        var formattedDate = this._formatDate(update.installDate);        dateCell.setAttribute("label", formattedDate);        var typeCell = document.createElementNS(NS_XUL, "treecell");        typeCell.setAttribute("label", update.type);        dump("*** name = " + update.name + ", date = " + update.installDate + ", type = " + update.type + ", state = " + update.state + "\n");        var stateCell = document.createElementNS(NS_XUL, "treecell");        stateCell.setAttribute("label", update.selectedPatch.state);        treerow.appendChild(nameCell);        treerow.appendChild(dateCell);        treerow.appendChild(typeCell);        treerow.appendChild(stateCell);        treeitem.appendChild(treerow);                this._children.appendChild(treeitem);      }    }              var closebuttonlabel = document.documentElement.getAttribute("closebuttonlabel");    var cancelbutton = document.documentElement.getButton("cancel");    cancelbutton.label = closebuttonlabel;    cancelbutton.focus();  },
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/82d50f4e1ffb006877014c9899e6703a7abe8d34/history.js/buggy/toolkit/mozapps/update/content/history.js