diff --git a/Userland/Libraries/LibWeb/HTML/HTMLAnchorElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLAnchorElement.cpp
index 343bc6a8ab8..d8771bc6733 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLAnchorElement.cpp
+++ b/Userland/Libraries/LibWeb/HTML/HTMLAnchorElement.cpp
@@ -156,27 +156,4 @@ void HTMLAnchorElement::set_text(String const& text)
string_replace_all(text);
}
-// https://html.spec.whatwg.org/multipage/text-level-semantics.html#dom-a-referrerpolicy
-StringView HTMLAnchorElement::referrer_policy() const
-{
- // FIXME: This should probably be `Reflect` in the IDL.
- // The IDL attribute referrerPolicy must reflect the referrerpolicy content attribute, limited to only known values.
- auto maybe_policy_string = attribute(HTML::AttributeNames::referrerpolicy);
- if (!maybe_policy_string.has_value())
- return ""sv;
-
- auto maybe_policy = ReferrerPolicy::from_string(maybe_policy_string.value());
- if (!maybe_policy.has_value())
- return ""sv;
-
- return ReferrerPolicy::to_string(maybe_policy.value());
-}
-
-// https://html.spec.whatwg.org/multipage/text-level-semantics.html#dom-a-referrerpolicy
-WebIDL::ExceptionOr HTMLAnchorElement::set_referrer_policy(String const& referrer_policy)
-{
- // The IDL attribute referrerPolicy must reflect the referrerpolicy content attribute, limited to only known values.
- return set_attribute(HTML::AttributeNames::referrerpolicy, referrer_policy);
-}
-
}
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLAnchorElement.h b/Userland/Libraries/LibWeb/HTML/HTMLAnchorElement.h
index bb84c69f084..be96f4e2b70 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLAnchorElement.h
+++ b/Userland/Libraries/LibWeb/HTML/HTMLAnchorElement.h
@@ -29,9 +29,6 @@ public:
String text() const;
void set_text(String const&);
- StringView referrer_policy() const;
- WebIDL::ExceptionOr set_referrer_policy(String const&);
-
// ^EventTarget
// https://html.spec.whatwg.org/multipage/interaction.html#the-tabindex-attribute:the-a-element
virtual bool is_focusable() const override { return has_attribute(HTML::AttributeNames::href); }
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLAnchorElement.idl b/Userland/Libraries/LibWeb/HTML/HTMLAnchorElement.idl
index 9bc44f7971a..17d2e6fbe4d 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLAnchorElement.idl
+++ b/Userland/Libraries/LibWeb/HTML/HTMLAnchorElement.idl
@@ -1,3 +1,4 @@
+#import
#import
#import
@@ -17,7 +18,7 @@ interface HTMLAnchorElement : HTMLElement {
[CEReactions] attribute DOMString text;
- [CEReactions] attribute DOMString referrerPolicy;
+ [CEReactions, Reflect=referrerpolicy, Enumerated=ReferrerPolicy] attribute DOMString referrerPolicy;
// Obsolete
[CEReactions, Reflect] attribute DOMString coords;