summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/HTML/HTMLAnchorElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/HTMLAnchorElement.cpp')
-rw-r--r--Userland/Libraries/LibWeb/HTML/HTMLAnchorElement.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLAnchorElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLAnchorElement.cpp
index 78ca088b3a..9817944cee 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLAnchorElement.cpp
+++ b/Userland/Libraries/LibWeb/HTML/HTMLAnchorElement.cpp
@@ -17,4 +17,22 @@ HTMLAnchorElement::~HTMLAnchorElement()
{
}
+void HTMLAnchorElement::parse_attribute(FlyString const& name, String const& value)
+{
+ HTMLElement::parse_attribute(name, value);
+ if (name == HTML::AttributeNames::href) {
+ set_the_url();
+ }
+}
+
+String HTMLAnchorElement::hyperlink_element_utils_href() const
+{
+ return attribute(HTML::AttributeNames::href);
+}
+
+void HTMLAnchorElement::set_hyperlink_element_utils_href(String href)
+{
+ set_attribute(HTML::AttributeNames::href, move(href));
+}
+
}