equalsAttributes method
Returns true if other have the same attributes.
Implementation
bool equalsAttributes(DOMElement other) {
if (hasEmptyAttributes && other.hasEmptyAttributes) return true;
final attributes = _attributes;
final otherAttributes = other._attributes;
if (attributes == null ||
otherAttributes == null ||
attributes.length != otherAttributes.length) {
return false;
}
for (var e in attributes.entries) {
var otherAttribute = otherAttributes[e.key];
if (otherAttribute == null ||
!_equalsAttribute(e.value, otherAttribute)) {
return false;
}
}
return true;
}