mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:37:35 +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
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…
Add table
Add a link
Reference in a new issue