mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 19:27:45 +00:00
LibWeb: Implement Node.isEqualNode() for Attr nodes
This commit is contained in:
parent
a004d3043f
commit
de2c302cdb
1 changed files with 12 additions and 1 deletions
|
@ -1262,8 +1262,19 @@ bool Node::is_equal_node(Node const* other_node) const
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case (u16)NodeType::ATTRIBUTE_NODE: {
|
||||||
|
// Its namespace, local name, and value.
|
||||||
|
auto& this_attr = verify_cast<Attr>(*this);
|
||||||
|
auto& other_attr = verify_cast<Attr>(*other_node);
|
||||||
|
if (this_attr.namespace_uri() != other_attr.namespace_uri())
|
||||||
|
return false;
|
||||||
|
if (this_attr.local_name() != other_attr.local_name())
|
||||||
|
return false;
|
||||||
|
if (this_attr.value() != other_attr.value())
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
case (u16)NodeType::PROCESSING_INSTRUCTION_NODE:
|
case (u16)NodeType::PROCESSING_INSTRUCTION_NODE:
|
||||||
case (u16)NodeType::ATTRIBUTE_NODE:
|
|
||||||
TODO();
|
TODO();
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue