rem: 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); 
add: var element = document.createElementNS(NS_XUL, "update"); this._view.appendChild(element); element.name = update.name; element.type = bundle.getString("updateType_" + update.type); element.installDate = this._formatDate(update.installDate); element.detailsURL = update.detailsURL; element.status = update.statusText; 
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: 7628	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/7628/5854da57b22e94b3d341bc122ebbd1afa6ad043a/history.js/buggy/content/history.js