MCPcopy Index your code
hub / github.com/HtmlUnit/htmlunit / basicAppend

Method basicAppend

src/main/java/org/htmlunit/html/DomNode.java:953–970  ·  view source on GitHub ↗

Appends the specified node to the end of this node's children, assuming the specified node is clean (doesn't have preexisting relationships to other nodes). @param node the node to append to this node's children

(final DomNode node)

Source from the content-addressed store, hash-verified

951 * @param node the node to append to this node's children
952 */
953 private void basicAppend(final DomNode node) {
954 // try to make the node setup as complete as possible
955 // before the node is reachable
956 node.setPage(getPage());
957 node.parent_ = this;
958
959 if (firstChild_ == null) {
960 firstChild_ = node;
961 }
962 else {
963 final DomNode last = getLastChild();
964 node.previousSibling_ = last;
965 node.nextSibling_ = null; // safety first
966
967 last.nextSibling_ = node;
968 }
969 firstChild_.previousSibling_ = node;
970 }
971
972 /**
973 * {@inheritDoc}

Callers 2

appendChildMethod · 0.95

Calls 3

getPageMethod · 0.95
getLastChildMethod · 0.95
setPageMethod · 0.80

Tested by

no test coverage detected