mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibXML: Notify the listener about the root node as well
We previously did not notify the listener about entering the root node, which caused the following snippet to produce the wrong output: a = new DOMParser a.parseFromString("<x/>", "text/xml").documentElement // != null
This commit is contained in:
parent
0ab19dc4cd
commit
87e95ceb69
Notes:
sideshowbarker
2024-07-18 02:13:10 +09:00
Author: https://github.com/alimpfard
Commit: 87e95ceb69
Pull-request: https://github.com/SerenityOS/serenity/pull/18645
Reviewed-by: https://github.com/gmta ✅
1 changed files with 1 additions and 1 deletions
|
@ -74,7 +74,7 @@ void Parser::append_node(NonnullOwnPtr<Node> node)
|
||||||
m_entered_node->content.get<Node::Element>().children.append(move(node));
|
m_entered_node->content.get<Node::Element>().children.append(move(node));
|
||||||
} else {
|
} else {
|
||||||
m_root_node = move(node);
|
m_root_node = move(node);
|
||||||
m_entered_node = m_root_node.ptr();
|
enter_node(*m_root_node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue