appendChild: newChild
Appends the newChild
node to the end of the child
list. If newChild
is already
linked into the document tree, it is unlinked before the append is
performed. This method returns a reference to the newChild
node.
The node to append. If the node is a DocumentFragment
node, the
children of newChild
are
appended in sequence to the end of the node's child
list.
Raised if the insert operation violates at least one
document structure rule. For instance, the node doesn't
allow children or doesn't allow children of the newChild
node type. This exception
is also raised if the operation creates a circular reference
(i.e., it tries to insert a node's parent as a node's
child).
Raised if the newChild
node is created in a
different document than that of the new parent node.
Raised if the new parent node is read-only.