LibWeb: Parse declarative shadow DOM template elements

We now honor the shadowrootmode attribute on template elements while
parsing, and instantiate a shadow tree as required by the spec.

(cherry picked from commit 9eb4b91168145def5677cd41057d34ecf369372b)
This commit is contained in:
Andreas Kling
2024-06-25 09:43:50 +02:00
committed by Nico Weber
parent 34a4b28b89
commit a5189537e9
5 changed files with 181 additions and 32 deletions

View File

@@ -63,4 +63,9 @@ void HTMLTemplateElement::cloned(Node& copy, bool clone_children)
});
}
void HTMLTemplateElement::set_template_contents(JS::NonnullGCPtr<DOM::DocumentFragment> contents)
{
m_content = contents;
}
}