mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:07:34 +00:00
LibWeb: Make Node.textContent more spec compliant
The current implementation felt a bit ad-hoc and notably allowed textContent to operate on all node types. It also only returned the child text content of the Node instead of the descendant text content.
This commit is contained in:
parent
d36838d050
commit
5e61382849
4 changed files with 40 additions and 14 deletions
|
@ -99,8 +99,9 @@ public:
|
|||
|
||||
virtual FlyString node_name() const = 0;
|
||||
|
||||
virtual String text_content() const;
|
||||
void set_text_content(const String&);
|
||||
String descendant_text_content() const;
|
||||
String text_content() const;
|
||||
void set_text_content(String const&);
|
||||
|
||||
Document& document() { return *m_document; }
|
||||
const Document& document() const { return *m_document; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue