1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 17:55:08 +00: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:
Andreas Kling 2020-06-25 23:42:08 +02:00
parent eb33021d65
commit 92d831c25b
7 changed files with 91 additions and 18 deletions

View file

@ -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;
}
}