XULTreeViewRecord.appendChild Member

add a child to the end of the child list for this record. takes care of updating the tree as well.

Syntax

object.appendChild(child);

Arguments

ArgumentSummary
child

Returns

Remarks

See Also

Source Code

function xtvr_appchild (child)
{
if (!isinstance(child, XULTreeViewRecord))
throw Components.results.NS_ERROR_INVALID_ARG;
child.isHidden = false;
child.parentRecord = this;
this.childData.push(child);
if ("isContainerOpen" in this && this.isContainerOpen)
{
//dd ("appendChild: " + xtv_formatRecord(child, ""));
if (this.calculateVisualRow() >= 0)
{
var tree = this.findContainerTree();
if (tree && tree.frozen)
this.needsReSort = true;
else
this.reSort(true); /* reSort, don't invalidate. we're going
* to do that in the
* onVisualFootprintChanged call. */
}
this.onVisualFootprintChanged(child.calculateVisualRow(),
child.visualFootprint);
}
}