From e9b56b5b9c91153985f9f5c3b6eaa4110ba19f94 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Mon, 17 Aug 2020 12:36:00 -0400 Subject: 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. --- Libraries/LibWeb/DOM/Node.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Libraries/LibWeb/DOM/Node.h') 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 append_child(NonnullRefPtr, bool notify = true); RefPtr insert_before(NonnullRefPtr node, RefPtr child, bool notify = true); + void remove_all_children(); virtual RefPtr 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; } -- cgit v1.2.3