mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:58:13 +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:
parent
eb33021d65
commit
92d831c25b
7 changed files with 91 additions and 18 deletions
|
@ -468,4 +468,12 @@ NonnullRefPtrVector<HTMLScriptElement> Document::take_scripts_to_execute_as_soon
|
|||
return move(m_scripts_to_execute_as_soon_as_possible);
|
||||
}
|
||||
|
||||
void Document::adopt_node(Node& subtree_root)
|
||||
{
|
||||
subtree_root.for_each_in_subtree([&](auto& node) {
|
||||
node.set_document({}, *this);
|
||||
return IterationDecision::Continue;
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue