diff --git a/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.cpp index 4d732aceec1..dc7a74b672b 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.cpp @@ -197,7 +197,8 @@ HTMLLinkElement::LinkProcessingOptions HTMLLinkElement::create_link_options() // FIXME: destination the result of translating the state of el's as attribute // crossorigin the state of el's crossorigin content attribute options.crossorigin = cors_setting_attribute_from_keyword(get_attribute(AttributeNames::crossorigin)); - // FIXME: referrer policy the state of el's referrerpolicy content attribute + // referrer policy the state of el's referrerpolicy content attribute + options.referrer_policy = ReferrerPolicy::from_string(get_attribute(AttributeNames::referrerpolicy).value_or(""_string)).value_or(ReferrerPolicy::ReferrerPolicy::EmptyString); // FIXME: source set el's source set // base URL document's URL options.base_url = document.url(); diff --git a/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.idl b/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.idl index 46874f18fe9..f031f6c4ded 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.idl +++ b/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.idl @@ -1,4 +1,5 @@ #import +#import #import #import @@ -20,7 +21,7 @@ interface HTMLLinkElement : HTMLElement { [FIXME, SameObject, PutForwards=value] readonly attribute DOMTokenList sizes; [CEReactions, Reflect=imagesrcset] attribute DOMString imageSrcset; [CEReactions, Reflect=imagesizes] attribute DOMString imageSizes; - [FIXME, CEReactions] attribute DOMString referrerPolicy; + [CEReactions, Reflect=referrerpolicy, Enumerated=ReferrerPolicy] attribute DOMString referrerPolicy; [FIXME, SameObject, PutForwards=value] readonly attribute DOMTokenList blocking; [CEReactions, Reflect] attribute boolean disabled; [CEReactions, Enumerated=FetchPriorityAttribute, Reflect=fetchpriority] attribute DOMString fetchPriority;