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

Method basicDetach

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

Cuts off all relationships this node has with siblings and parents.

()

Source from the content-addressed store, hash-verified

1181 * Cuts off all relationships this node has with siblings and parents.
1182 */
1183 private void basicDetach() {
1184 if (parent_ != null && parent_.firstChild_ == this) {
1185 parent_.firstChild_ = nextSibling_;
1186 }
1187 else if (previousSibling_ != null && previousSibling_.nextSibling_ == this) {
1188 previousSibling_.nextSibling_ = nextSibling_;
1189 }
1190 if (nextSibling_ != null && nextSibling_.previousSibling_ == this) {
1191 nextSibling_.previousSibling_ = previousSibling_;
1192 }
1193 if (parent_ != null && parent_.getLastChild() == this) {
1194 parent_.firstChild_.previousSibling_ = previousSibling_;
1195 }
1196 }
1197
1198 private void fireRemoval(final DomNode exParent) {
1199 final SgmlPage page = getPage();

Callers 1

basicRemoveMethod · 0.95

Calls 1

getLastChildMethod · 0.45

Tested by

no test coverage detected