1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 03:57:44 +00:00

LibWeb: Move get_element_by_id() to a NonElementParentNode mixin class

This matches the current version of the DOM spec. And since C++ doesn't
have mixins this is actually a CRTP class.
This commit is contained in:
Andreas Kling 2020-03-28 09:12:13 +01:00
parent 95cc4c7e74
commit 660ec504ca
5 changed files with 68 additions and 17 deletions

View file

@ -27,11 +27,14 @@
#pragma once
#include <AK/FlyString.h>
#include <LibWeb/DOM/NonElementParentNode.h>
#include <LibWeb/DOM/ParentNode.h>
namespace Web {
class DocumentFragment : public ParentNode {
class DocumentFragment
: public ParentNode
, public NonElementParentNode<DocumentFragment> {
public:
DocumentFragment(Document& document)
: ParentNode(document, NodeType::DOCUMENT_FRAGMENT_NODE)