Logo Search packages:      
Sourcecode: xulrunner version File versions  Download package

nsresult nsINode::AppendChildTo ( nsIContent aKid,
PRBool  aNotify 
) [inline, inherited]

Append a content node to the end of the child list. This method handles calling BindToTree on the child appropriately.

aKid the content to append
aNotify whether to notify the document (current document for nsIContent, and |this| for nsIDocument) that the append has occurred
NS_ERROR_DOM_HIERARCHY_REQUEST_ERR if one attempts to have more than one element node as a child of a document. Doing this will also assert -- you shouldn't be doing it! Check with nsIDocument::GetRootContent() first if you're not sure. Apart from this one constraint, this doesn't do any checking on whether aKid is a valid child of |this|.
NS_ERROR_OUT_OF_MEMORY in some cases (from BindToTree).

Definition at line 353 of file nsINode.h.

References nsINode::GetChildCount(), and nsINode::InsertChildAt().

Referenced by nsXULContentBuilder::BuildContentFromTemplate(), nsXULDocument::CreateTemplateBuilder(), nsXULContentBuilder::EnsureElementHasGenericChild(), and nsHTMLOptionElement::Initialize().

    return InsertChildAt(aKid, GetChildCount(), aNotify);

Generated by  Doxygen 1.6.0   Back to index