CDATASection.h 680 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright (c) 2022, Luke Wilde <lukew@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <AK/RefCounted.h>
  8. #include <LibWeb/DOM/Text.h>
  9. namespace Web::DOM {
  10. class CDATASection final : public Text {
  11. WEB_PLATFORM_OBJECT(CDATASection, Text);
  12. JS_DECLARE_ALLOCATOR(CDATASection);
  13. public:
  14. virtual ~CDATASection() override;
  15. // ^Node
  16. virtual FlyString node_name() const override { return "#cdata-section"_fly_string; }
  17. private:
  18. CDATASection(Document&, String const&);
  19. virtual void initialize(JS::Realm&) override;
  20. };
  21. template<>
  22. inline bool Node::fast_is<CDATASection>() const { return is_cdata_section(); }
  23. }