1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 14:44:57 +00:00
serenity/Libraries/LibHTML/DOM/Text.h
Andreas Kling 0c6af2d5b4 LibHTML: Add Node::text_content()
This returns a String built from all of a Node's text descendants,
including itself.
2019-09-29 16:23:09 +02:00

19 lines
402 B
C++

#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:
String m_data;
};