LibWeb: Implement HTMLImageElement.fetchPriority

This commit is contained in:
Jamie Mansfield 2024-05-27 09:46:36 +01:00 committed by Tim Ledbetter
parent 956106c6d8
commit 8315ad6759
Notes: sideshowbarker 2024-07-17 00:37:23 +09:00
4 changed files with 26 additions and 2 deletions

View file

@ -563,7 +563,8 @@ after_step_7:
// 21. Set request's referrer policy to the current state of the element's referrerpolicy attribute.
request->set_referrer_policy(ReferrerPolicy::from_string(get_attribute_value(HTML::AttributeNames::referrerpolicy)).value_or(ReferrerPolicy::ReferrerPolicy::EmptyString));
// FIXME: 22. Set request's priority to the current state of the element's fetchpriority attribute.
// 22. Set request's priority to the current state of the element's fetchpriority attribute.
request->set_priority(Fetch::Infrastructure::request_priority_from_string(get_attribute_value(HTML::AttributeNames::fetchpriority)).value_or(Fetch::Infrastructure::Request::Priority::Auto));
// 24. If the will lazy load element steps given the img return true, then:
if (will_lazy_load_element()) {