mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-30 19:47:17 +02:00
LibWeb: Add HTMLAnchorElement.text getter and setter
And a FIXME for the missing `referrerPolicy` property.
This commit is contained in:
Notes:
sideshowbarker
2024-07-17 10:05:47 +09:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/SerenityOS/serenity/commit/0c19d3aa58 Pull-request: https://github.com/SerenityOS/serenity/pull/18086 Reviewed-by: https://github.com/linusg
@@ -100,4 +100,18 @@ Optional<ARIA::Role> HTMLAnchorElement::default_role() const
|
||||
return ARIA::Role::generic;
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/text-level-semantics.html#dom-a-text
|
||||
DeprecatedString HTMLAnchorElement::text() const
|
||||
{
|
||||
// The text attribute's getter must return this element's descendant text content.
|
||||
return descendant_text_content();
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/text-level-semantics.html#dom-a-text
|
||||
void HTMLAnchorElement::set_text(DeprecatedString const& text)
|
||||
{
|
||||
// The text attribute's setter must string replace all with the given value within this element.
|
||||
string_replace_all(text);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user