summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorAlexander Narsudinov <a.narsudinov@gmail.com>2022-12-17 17:05:35 +0300
committerAndreas Kling <kling@serenityos.org>2022-12-17 18:27:57 +0100
commit7679d38c5f9540cf6e8c5b06c8ed0875f227c41d (patch)
treeac07d9fe03616fb3dceb3430706bdfc3b3d39ae1 /Userland
parentf2d7690702fadd4bd4bdee7229461357ea7d56e6 (diff)
downloadserenity-7679d38c5f9540cf6e8c5b06c8ed0875f227c41d.zip
LibWeb: Fix incorrect behaviour in NamedNodeMap::removeNamedItem()
According to the spec we should return removed attribute, but the old implementation returned nullptr instead. Now we return the element's removed attribute.
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibWeb/DOM/NamedNodeMap.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/NamedNodeMap.cpp b/Userland/Libraries/LibWeb/DOM/NamedNodeMap.cpp
index 6d47d3c065..2c64ace03d 100644
--- a/Userland/Libraries/LibWeb/DOM/NamedNodeMap.cpp
+++ b/Userland/Libraries/LibWeb/DOM/NamedNodeMap.cpp
@@ -103,7 +103,7 @@ WebIDL::ExceptionOr<Attr const*> NamedNodeMap::remove_named_item(StringView qual
return WebIDL::NotFoundError::create(realm(), DeprecatedString::formatted("Attribute with name '{}' not found", qualified_name));
// 3. Return attr.
- return nullptr;
+ return attribute;
}
// https://dom.spec.whatwg.org/#concept-element-attributes-get-by-name