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

Method fireRemoval

src/main/java/org/htmlunit/html/DomNode.java:1198–1213  ·  view source on GitHub ↗
(final DomNode exParent)

Source from the content-addressed store, hash-verified

1196 }
1197
1198 private void fireRemoval(final DomNode exParent) {
1199 final SgmlPage page = getPage();
1200 if (page instanceof HtmlPage htmlPage) {
1201 // some actions executed on removal need an intact parent relationship (e.g. for the
1202 // DocumentPositionComparator) so we have to restore it temporarily
1203 parent_ = exParent;
1204 htmlPage.notifyNodeRemoved(this);
1205 parent_ = null;
1206 }
1207
1208 if (exParent != null && (page == null || page.isDomChangeListenerInUse())) {
1209 fireNodeDeleted(exParent, this);
1210 // ask ex-parent to fire event (because we don't have parent now)
1211 exParent.fireNodeDeleted(exParent, this);
1212 }
1213 }
1214
1215 /**
1216 * {@inheritDoc}

Callers 1

detachMethod · 0.95

Calls 4

getPageMethod · 0.95
fireNodeDeletedMethod · 0.95
notifyNodeRemovedMethod · 0.80

Tested by

no test coverage detected