Appends a node to the child collection.
@method appendChild
@param childNode {Node} the new node
@return {Node} the child node
@private
500052
function(childNode) {
        if (this.hasChildren()) {
            var sib = this.children[this.children.length - 1];
            sib.nextSibling = childNode;
            childNode.previousSibling = sib;
        }
        this.children[this.children.length] = childNode;
        childNode.applyParent(this);

        // part of the IE display issue workaround. If child nodes
        // are added after the initial render, and the node was
        // instantiated with expanded = true, we need to show the
        // children div now that the node has a child.
        if (this.childrenRendered && this.expanded) {
            this.getChildrenEl().style.display = "";
        }

        return childNode;
    }
1371024
public void appendChildren(Iterable<? extends NodeInfo> children) {
        Level current = path.getLast();
        int comments, pis, texts;
        comments = pis = texts = 0;
        Map<String, Integer> elements = new HashMap<String, Integer>();

        for (Level l : current.children) {
            String childName = l.expression;
            if (childName.startsWith(COMMENT)) {
                comments++;
            } else if (childName.startsWith(PI)) {
                pis++;
            } else if (childName.startsWith(TEXT)) {
                texts++;
            } else {
                childName = childName.substring(0, childName.indexOf(OPEN));
                add1OrIncrement(childName, elements);
            }
        }

        for (NodeInfo child : children) {
            Level l;
            switch (child.getType()) {
            case Node.COMMENT_NODE:
                l = new Level(COMMENT + OPEN + (++comments) + CLOSE);
                break;
            case Node.PROCESSING_INSTRUCTION_NODE:
                l = new Level(PI + OPEN + (++pis) + CLOSE);
                break;
            case Node.CDATA_SECTION_NODE:
            case Node.TEXT_NODE:
                l = new Level(TEXT + OPEN + (++texts) + CLOSE);
                break;
            case Node.ELEMENT_NODE:
                String name = getName(child.getName());
                l = new Level(name + OPEN + add1OrIncrement(name, elements)
                              + CLOSE);
                break;
            default:
                // more or less ignore
                // FIXME: is this a good thing?
                l = new Level(EMPTY);
                break;
            }
            current.children.add(l);
        }
    }
949160
public Node addNode(Node subNode) {
		if (this instanceof Node) {
			subNode.parentNode = (Node) this;
		}
		contents.add(subNode);
		return subNode;
	}
1000104
function loadChildNodes(parentNode){
    if (gNodesWithChildren[parentNode._id]){
        var children = [];
        for (var i = 0; i < gNodesWithChildren[parentNode._id].length; ++i){
            var currentNode = gNodesWithChildren[parentNode._id][i];
            children.push({
                _id : currentNode._id, //todo : id instead of name?
                node : currentNode,
                parent : parentNode._id, //todo id instead of name?
                childNodes : loadChildNodes(currentNode)
            });
        }
        return children;
    }
}
1014112
public void addChildAfter(Node newChild, Node node) {
        if (newChild.next != null)
            throw new RuntimeException(
                      "newChild had siblings in addChildAfter");
        newChild.next = node.next;
        node.next = newChild;
        if (last == node)
            last = newChild;
    }
1180656
def append_child(self, child):
        
        child.parent = self
        self.children.append(child)
        self.changed()
562764
function (polygon) {
    let newchild = new PolygonTreeNode()
    newchild.parent = this
    newchild.polygon = polygon
    this.children.push(newchild)
    return newchild
  }
71667
public Node<T> addChild(Node<T> child) {
        if (children == null) {
            children = new ArrayList<Node<T>>();
        }
        child.parent = this;
        children.add(child);

        return child;
    }
1323658
@Override
	public void addChild(final ITreeNode<T> child)
	{
		if (children != null)
		{
			children.add(child);
		}
		else
		{
			children = new ArrayList<>();
			children.add(child);
		}

	}
455215
function(element, child){
    if(_.isString(child))
      element.innerHTML += child;
    else if (_.isElement(child))
      element.appendChild(child);
  }
297987
function(elem, child) {
		if (child) {
			if (elem.nodeType === 8) { // comment
				if (child.nodeType === 3) { // text node
					elem.nodeValue += child.nodeValue;
				}

			} else if (elem.canHaveChildren !== false) {
				elem.appendChild(child);
			}
		}
	}
28830
public void addChild(HelpTopicNode node, int index) {
        node.detach();
        node.parent = this;
        
        if (index < 0) {
            children.add(node);
        } else {
            children.add(index, node);
        }
    }
150322
function addNodeToGraph(node){

    gNodesDisplayed.push(node);
    g.addNode(node._id, node);


    if (contains(childrenNodes, node._id)){
        var parentNode = getNodeFromId(nodesToBeLinked[node._id].from);
        if (contains(gNodesDisplayed, parentNode)){
            addLinkToParent(node._id, parentNode._id);
        }
    }
}
411380
function (node, newNode) {
        return node.nextSibling ? node.parentNode.insertBefore(newNode, node.nextSibling):
            node.parentNode.appendChild(newNode);
    }
1216885
def appendChild(self, child):
		
		self.childNodes.append(child)
		child.parentNode = self
		self._verifyChildren(len(self.childNodes) - 1)
		return child
583266
public static void appendChild(Document doc, Element parentElement, String elementName, String elementValue) {
        Element child = doc.createElement(elementName);
        Text text = doc.createTextNode(elementValue);
        child.appendChild(text);
        parentElement.appendChild(child);
    }
617714
def _add_child(self, collection, set, child):
        """"""
        added = None
        for c in child:
            if c not in set:
                set.add(c)
                collection.append(c)
                added = 1
        if added:
            self._children_reset()