mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:27:45 +00:00
LibHTML: Add DocumentFragment
Right now this is just a simple ParentNode subclass with its node type being DOCUMENT_FRAGMENT_NODE.
This commit is contained in:
parent
26493a3039
commit
f404a1dc16
2 changed files with 21 additions and 0 deletions
19
Libraries/LibHTML/DOM/DocumentFragment.h
Normal file
19
Libraries/LibHTML/DOM/DocumentFragment.h
Normal file
|
@ -0,0 +1,19 @@
|
|||
#pragma once
|
||||
|
||||
#include <LibHTML/DOM/ParentNode.h>
|
||||
|
||||
class DocumentFragment : public ParentNode {
|
||||
public:
|
||||
DocumentFragment(Document& document)
|
||||
: ParentNode(document, NodeType::DOCUMENT_FRAGMENT_NODE)
|
||||
{
|
||||
}
|
||||
|
||||
virtual String tag_name() const override { return "#document-fragment"; }
|
||||
};
|
||||
|
||||
template<>
|
||||
inline bool is<DocumentFragment>(const Node& node)
|
||||
{
|
||||
return node.is_document_fragment();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue