mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 23:09:08 +00:00
LibWeb: Implement <template> parsing
Note that there is currently no way to display them as we can't currently clone nodes. Adds special case for templates for dumping to console. Doesn't add it to the DOM inspector as I'm not sure how to do it.
This commit is contained in:
parent
f48feae0b2
commit
7902d215b3
Notes:
sideshowbarker
2024-07-19 03:23:09 +09:00
Author: https://github.com/Lubrsi
Commit: 7902d215b3
Pull-request: https://github.com/SerenityOS/serenity/pull/3224
Reviewed-by: https://github.com/awesomekling
14 changed files with 174 additions and 28 deletions
|
@ -26,6 +26,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/DOM/DocumentFragment.h>
|
||||
#include <LibWeb/HTML/HTMLElement.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
@ -36,6 +37,14 @@ public:
|
|||
|
||||
HTMLTemplateElement(DOM::Document&, const FlyString& local_name);
|
||||
virtual ~HTMLTemplateElement() override;
|
||||
|
||||
NonnullRefPtr<DOM::DocumentFragment> content() { return *m_content; }
|
||||
const NonnullRefPtr<DOM::DocumentFragment> content() const { return *m_content; }
|
||||
|
||||
private:
|
||||
DOM::Document& appropriate_template_contents_owner_document(DOM::Document&);
|
||||
|
||||
RefPtr<DOM::DocumentFragment> m_content;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue