code: public Element appendChild(Node child) {
          Validate.notNull(child);
  
          // was - Node#addChildren(child). short-circuits an array create and a loop.
          reparentChild(child);
          ensureChildNodes();
          childNodes.add(child);
          child.setSiblingIndex(childNodes.size() - 1);
          return this;
      }
docs: Add a node child node to this element.
  
  @param child node to add.
  @return this element, so that you can add more child nodes or elements.