CDATASection.h 672 B

1234567891011121314151617181920212223242526272829303132
  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. public:
  13. virtual ~CDATASection() override;
  14. // ^Node
  15. virtual DeprecatedFlyString node_name() const override { return "#cdata-section"; }
  16. private:
  17. CDATASection(Document&, DeprecatedString const&);
  18. virtual JS::ThrowCompletionOr<void> initialize(JS::Realm&) override;
  19. };
  20. template<>
  21. inline bool Node::fast_is<CDATASection>() const { return is_cdata_section(); }
  22. }