mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-28 02:27:19 +02:00
LibWeb/HTML: Implement HTMLTemplateElement.content to spec
No real behaviour change - it just means we VERIFY before returning the value we returned before.
This commit is contained in:
Notes:
github-actions[bot]
2025-11-27 10:27:12 +00:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/LadybirdBrowser/ladybird/commit/37d07410995 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6951
@@ -76,6 +76,16 @@ WebIDL::ExceptionOr<void> HTMLTemplateElement::cloned(Node& copy, bool subtree)
|
||||
return {};
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/scripting.html#dom-template-content
|
||||
GC::Ref<DOM::DocumentFragment> HTMLTemplateElement::content_for_bindings() const
|
||||
{
|
||||
// 1. Assert: this's template contents is not a ShadowRoot node.
|
||||
VERIFY(!m_content->is_shadow_root());
|
||||
|
||||
// 2. Return this's template contents.
|
||||
return *m_content;
|
||||
}
|
||||
|
||||
void HTMLTemplateElement::set_template_contents(GC::Ref<DOM::DocumentFragment> contents)
|
||||
{
|
||||
m_content = contents;
|
||||
|
||||
Reference in New Issue
Block a user