1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:07:35 +00:00

LibHTML: Add Node::text_content()

This returns a String built from all of a Node's text descendants,
including itself.
This commit is contained in:
Andreas Kling 2019-09-29 16:22:15 +02:00
parent 93230386f7
commit 0c6af2d5b4
3 changed files with 24 additions and 4 deletions

View file

@ -12,6 +12,8 @@ public:
virtual String tag_name() const override { return "#text"; }
virtual String text_content() const override { return m_data; }
private:
String m_data;
};