summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/DOM/CDATASection.h
blob: e56aeac0f6aad039691c20da3fdb92ce26821606 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
 * Copyright (c) 2022, Luke Wilde <lukew@serenityos.org>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#pragma once

#include <AK/RefCounted.h>
#include <LibWeb/DOM/Text.h>

namespace Web::DOM {

class CDATASection final : public Text {
    WEB_PLATFORM_OBJECT(CDATASection, Text);

public:
    virtual ~CDATASection() override;

    // ^Node
    virtual DeprecatedFlyString node_name() const override { return "#cdata-section"; }

private:
    CDATASection(Document&, DeprecatedString const&);

    virtual JS::ThrowCompletionOr<void> initialize(JS::Realm&) override;
};

template<>
inline bool Node::fast_is<CDATASection>() const { return is_cdata_section(); }

}