From f05d291b4103dbf5e22c6d6f8ad7a5b122f243ec Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Sat, 2 Sep 2023 10:10:21 -0400 Subject: [PATCH] LibWeb: Use the spec-mandated set-value when setting an attribute --- Userland/Libraries/LibWeb/DOM/Element.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Userland/Libraries/LibWeb/DOM/Element.cpp b/Userland/Libraries/LibWeb/DOM/Element.cpp index b6e8412576..118dfa772b 100644 --- a/Userland/Libraries/LibWeb/DOM/Element.cpp +++ b/Userland/Libraries/LibWeb/DOM/Element.cpp @@ -209,10 +209,10 @@ WebIDL::ExceptionOr Element::set_attribute_ns(DeprecatedFlyString const& n // 1. Let namespace, prefix, and localName be the result of passing namespace and qualifiedName to validate and extract. auto extracted_qualified_name = TRY(validate_and_extract(realm(), namespace_, qualified_name)); - // FIXME: 2. Set an attribute value for this using localName, value, and also prefix and namespace. + // 2. Set an attribute value for this using localName, value, and also prefix and namespace. + set_attribute_value(extracted_qualified_name.local_name(), value, extracted_qualified_name.prefix(), extracted_qualified_name.namespace_()); - // FIXME: Don't just call through to setAttribute() here. - return set_attribute(extracted_qualified_name.local_name(), value); + return {}; } // https://dom.spec.whatwg.org/#concept-element-attributes-set-value