mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-02 01:08:48 +00:00
LibWeb/HTML: Implement text attribute in HTMLTitleElement
This commit is contained in:
parent
d6df13af6a
commit
24b9d05ea8
Notes:
sideshowbarker
2024-07-16 20:39:14 +09:00
Author: https://github.com/kemzeb
Commit: 24b9d05ea8
Pull-request: https://github.com/SerenityOS/serenity/pull/22122
5 changed files with 48 additions and 19 deletions
|
@ -34,4 +34,18 @@ void HTMLTitleElement::children_changed()
|
|||
}
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/semantics.html#dom-title-text
|
||||
DeprecatedString HTMLTitleElement::text()
|
||||
{
|
||||
// The text attribute's getter must return this title element's child text content.
|
||||
return child_text_content();
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/semantics.html#dom-title-text
|
||||
void HTMLTitleElement::set_text(String const& value)
|
||||
{
|
||||
// The text attribute's setter must string replace all with the given value within this title element.
|
||||
string_replace_all(value.to_deprecated_string());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue