(final DomNode exParent)
| 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} |
no test coverage detected