support long svg element types

This commit is contained in:
Karl Seguin
2025-11-20 20:00:20 +08:00
parent 0e65bfc78b
commit 7b513bd29d

View File

@@ -172,7 +172,7 @@ pub fn svgElement(self: *Factory, tag_name: []const u8, child: anytype) !*@TypeO
}
// will never allocate, can't fail
const tag_name_str = String.init(undefined, tag_name, .{}) catch unreachable;
const tag_name_str = String.init(self.page.arena, tag_name, .{}) catch unreachable;
if (comptime fieldIsPointer(Element.Svg.Type, @TypeOf(child))) {
const child_ptr = try self.createT(@TypeOf(child));