Skip to content

Lightpanda: the headless browser designed for AI and automation

apply same href-less detection to shell measurement

Karl Seguin550c2b3c61f1
diff --git a/src/browser/RenderTree.zig b/src/browser/RenderTree.zig
index 211846b76..fe3ea26c9 100644
--- a/src/browser/RenderTree.zig
+++ b/src/browser/RenderTree.zig
@@ -343,7 +343,7 @@ fn measureChild(self: *const RenderTree, child: Child, where: Measure.Where, m:
const el = child.node.subtype(Element);
const inner: Measure.Where = .{
.shell = where.shell or dump_html.isShellElement(el),
- .link = where.link or el.getTag() == .anchor,
+ .link = where.link or (el.getTag() == .anchor and el.getAttributeInterned("href") != null),
};
if (el.is(Slot)) |slot| {
var it = self.slotted(slot);