summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb/DOM/Node.h
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2020-08-17 12:36:00 -0400
committerAndreas Kling <kling@serenityos.org>2020-08-17 21:23:11 +0200
commite9b56b5b9c91153985f9f5c3b6eaa4110ba19f94 (patch)
tree421856ab315fce79c4c8bc9742915f94d8381a83 /Libraries/LibWeb/DOM/Node.h
parentc0c7b4a0986024ea37e2b37c643d08abdeacba47 (diff)
downloadserenity-e9b56b5b9c91153985f9f5c3b6eaa4110ba19f94.zip
LibWeb: Add Node.textContent
This requires moving remove_all_children() from ParentNode to Node, which makes ParentNode.cpp empty, so remove it. It also co-opts the existing Node::text_content() method and tweaks it slightly to fit the semantics of Node.textContent.
Diffstat (limited to 'Libraries/LibWeb/DOM/Node.h')
-rw-r--r--Libraries/LibWeb/DOM/Node.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Libraries/LibWeb/DOM/Node.h b/Libraries/LibWeb/DOM/Node.h
index c46ccc07e9..f5abb4ede0 100644
--- a/Libraries/LibWeb/DOM/Node.h
+++ b/Libraries/LibWeb/DOM/Node.h
@@ -79,12 +79,14 @@ public:
RefPtr<Node> append_child(NonnullRefPtr<Node>, bool notify = true);
RefPtr<Node> insert_before(NonnullRefPtr<Node> node, RefPtr<Node> child, bool notify = true);
+ void remove_all_children();
virtual RefPtr<LayoutNode> create_layout_node(const CSS::StyleProperties* parent_style);
virtual FlyString node_name() const = 0;
virtual String text_content() const;
+ void set_text_content(const String&);
Document& document() { return *m_document; }
const Document& document() const { return *m_document; }