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

Method replace

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

Replaces this node with another node. If the specified node is this node, this method is a no-op. @param newNode the node to replace this one

(final DomNode newNode)

Source from the content-addressed store, hash-verified

1230 * @param newNode the node to replace this one
1231 */
1232 public void replace(final DomNode newNode) {
1233 if (newNode != this) {
1234 final DomNode exParent = parent_;
1235 final DomNode exNextSibling = nextSibling_;
1236
1237 remove();
1238
1239 exParent.insertBefore(newNode, exNextSibling);
1240 }
1241 }
1242
1243 /**
1244 * <span style="color:red">INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.</span><br>

Callers 15

replaceMethod · 0.95
getNewNodeByIdMethod · 0.95
replaceChildMethod · 0.95
replaceWithMethod · 0.95
RequestFunction · 0.45
decodeFunction · 0.45
parseHeadersFunction · 0.45
escapeQueryMethod · 0.45
replaceChildMethod · 0.45
replaceOptionMethod · 0.45
addMethod · 0.45

Calls 2

removeMethod · 0.95
insertBeforeMethod · 0.95

Tested by 2

replaceMethod · 0.76
getNewNodeByIdMethod · 0.76