Skip to content

Lightpanda: the headless browser designed for AI and automation

keep enum namespace comparison for known enums

Karl Seguin0a7af7f82596
diff --git a/src/browser/webapi/Element.zig b/src/browser/webapi/Element.zig
index ea34fbd93..8e69be521 100644
--- a/src/browser/webapi/Element.zig
+++ b/src/browser/webapi/Element.zig
@@ -243,7 +243,12 @@ pub fn asConstNode(self: *const Element) *const Node {
}
pub fn isEqualNode(self: *Element, other: *Element, frame: *Frame) bool {
- if (!optionalStringEql(self.getNamespaceUri(frame), other.getNamespaceUri(frame))) {
+ if (self._namespace != other._namespace) {
+ return false;
+ }
+
+ // Custom namespace URIs live in a page lookup, not in the enum.
+ if (self._namespace == .unknown and !optionalStringEql(self.getNamespaceUri(frame), other.getNamespaceUri(frame))) {
return false;
}