DocumentFragment.h [plain text]
#ifndef DocumentFragment_h
#define DocumentFragment_h
#include "ContainerNode.h"
#include "FragmentScriptingPermission.h"
namespace WebCore {
class DocumentFragment : public ContainerNode {
public:
static Ref<DocumentFragment> create(Document&);
void parseHTML(const String&, Element* contextElement, ParserContentPolicy = AllowScriptingContent);
bool parseXML(const String&, Element* contextElement, ParserContentPolicy = AllowScriptingContent);
bool canContainRangeEndPoint() const final { return true; }
virtual bool isTemplateContent() const { return false; }
Element* getElementById(const AtomicString&) const;
protected:
DocumentFragment(Document&, ConstructionType = CreateContainer);
String nodeName() const final;
private:
NodeType nodeType() const final;
Ref<Node> cloneNodeInternal(Document&, CloningOperation) override;
bool childTypeAllowed(NodeType) const override;
};
}
SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::DocumentFragment)
static bool isType(const WebCore::Node& node) { return node.isDocumentFragment(); }
SPECIALIZE_TYPE_TRAITS_END()
#endif