Skip to content

Commit

Permalink
one step back to fix the iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
rbri committed Nov 4, 2024
1 parent 12e6b31 commit 94162af
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/main/java/org/htmlunit/html/HtmlPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -1744,10 +1744,14 @@ void notifyNodeAdded(final DomNode node) {
if (node instanceof BaseFrameElement) {
frameElements_.add((BaseFrameElement) node);
}
for (final Iterator<BaseFrameElement> iterator
= node.new DescendantElementsIterator<>(BaseFrameElement.class);
iterator.hasNext();) {
frameElements_.add(iterator.next());

for (final Iterator<HtmlElement> iterator
= node.new DescendantElementsIterator<>(HtmlElement.class);
iterator.hasNext();) {
final HtmlElement child = iterator.next();
if (child instanceof BaseFrameElement) {
frameElements_.add((BaseFrameElement) child);
}
}

if ("base".equals(node.getNodeName())) {
Expand Down

0 comments on commit 94162af

Please sign in to comment.