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

Method replaceChild

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

{@inheritDoc}

(final Node newChild, final Node oldChild)

Source from the content-addressed store, hash-verified

1216 * {@inheritDoc}
1217 */
1218 @Override
1219 public Node replaceChild(final Node newChild, final Node oldChild) {
1220 if (oldChild.getParentNode() != this) {
1221 throw new DOMException(DOMException.NOT_FOUND_ERR, "Node is not a child of this node.");
1222 }
1223 ((DomNode) oldChild).replace((DomNode) newChild);
1224 return oldChild;
1225 }
1226
1227 /**
1228 * Replaces this node with another node. If the specified node is this node, this

Callers 1

changeTypeMethod · 0.45

Calls 2

getParentNodeMethod · 0.45
replaceMethod · 0.45

Tested by

no test coverage detected