mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 19:04:58 +00:00
LibWeb: Add HTMLAnchorElement.text getter and setter
And a FIXME for the missing `referrerPolicy` property.
This commit is contained in:
@@ -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