mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 10:07:43 +00:00
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.
This commit is contained in:
parent
c0c7b4a098
commit
e9b56b5b9c
7 changed files with 44 additions and 44 deletions
|
@ -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; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue