mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-09 18:16:09 +03: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: https://github.com/SerenityOS/serenity/commit/87e95ceb69 Pull-request: https://github.com/SerenityOS/serenity/pull/18645 Reviewed-by: https://github.com/gmta ✅
@ -74,7 +74,7 @@ void Parser::append_node(NonnullOwnPtr<Node> node)
|
||||
m_entered_node->content.get<Node::Element>().children.append(move(node));
|
||||
} else {
|
||||
m_root_node = move(node);
|
||||
m_entered_node = m_root_node.ptr();
|
||||
enter_node(*m_root_node);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user