summaryrefslogtreecommitdiff
path: root/Libraries/LibHTML/DOM/Text.h
blob: 46e29ba0c6784413f2429453044d93c9dc2abf2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once

#include <AK/String.h>
#include <LibHTML/DOM/Node.h>

class Text final : public Node {
public:
    explicit Text(Document&, const String&);
    virtual ~Text() override;

    const String& data() const { return m_data; }

    virtual String tag_name() const override { return "#text"; }

    virtual String text_content() const override { return m_data; }

private:
    virtual RefPtr<LayoutNode> create_layout_node(const StyleResolver&, const StyleProperties* parent_properties) const override;

    String m_data;
};