mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
LibWeb: Make method NamedNodeMap::set_attribute() closer to the spec
This patch eliminates 1 FIXME that I've got during fixme roulette! :^)
This commit is contained in:
parent
1a0fbe1e85
commit
ce6cf5bab8
Notes:
sideshowbarker
2024-07-17 03:04:21 +09:00
Author: https://github.com/a-narsudinov Commit: https://github.com/SerenityOS/serenity/commit/ce6cf5bab8 Pull-request: https://github.com/SerenityOS/serenity/pull/16549
1 changed files with 1 additions and 2 deletions
|
@ -168,9 +168,8 @@ WebIDL::ExceptionOr<Attr const*> NamedNodeMap::set_attribute(Attr& attribute)
|
|||
return WebIDL::InUseAttributeError::create(realm(), "Attribute must not already be in use"sv);
|
||||
|
||||
// 2. Let oldAttr be the result of getting an attribute given attr’s namespace, attr’s local name, and element.
|
||||
// FIXME: When getNamedItemNS is implemented, use that instead.
|
||||
size_t old_attribute_index = 0;
|
||||
auto* old_attribute = get_attribute(attribute.local_name(), &old_attribute_index);
|
||||
auto* old_attribute = get_attribute_ns(attribute.namespace_uri(), attribute.local_name(), &old_attribute_index);
|
||||
|
||||
// 3. If oldAttr is attr, return attr.
|
||||
if (old_attribute == &attribute)
|
||||
|
|
Loading…
Reference in a new issue