mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 20:17:13 +02:00
LibWeb: Implement fragment parsing and use it for Element.innerHTML
This patch implements most of the HTML fragment parsing algorithm and ports Element::set_inner_html() to it. This was the last remaining user of the old HTML parser. :^)
This commit is contained in:
Notes:
sideshowbarker
2024-07-19 05:22:28 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/92d831c25b9
@@ -51,7 +51,7 @@
|
||||
namespace Web {
|
||||
|
||||
Node::Node(Document& document, NodeType type)
|
||||
: m_document(document)
|
||||
: m_document(&document)
|
||||
, m_type(type)
|
||||
{
|
||||
}
|
||||
@@ -212,4 +212,9 @@ RefPtr<Node> Node::insert_before(NonnullRefPtr<Node> node, RefPtr<Node> child, b
|
||||
return node;
|
||||
}
|
||||
|
||||
void Node::set_document(Badge<Document>, Document& document)
|
||||
{
|
||||
m_document = &document;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user