From 5ecd48d4b9f928beb4143f88e802ee4d9e25a2bd Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Thu, 30 Apr 2026 17:36:52 +0200 Subject: refactor(element): supports more type in root append --- src/eval/html/Root.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/eval/html/Root.zig') diff --git a/src/eval/html/Root.zig b/src/eval/html/Root.zig index acfe82e..6c4c37a 100644 --- a/src/eval/html/Root.zig +++ b/src/eval/html/Root.zig @@ -39,7 +39,7 @@ pub fn append(self: *Self, raw: anytype) Error!void { const el: Element = blk: { const T = @TypeOf(raw); if (T == Element) break :blk raw; - if (@hasDecl(T, "html")) break :blk try raw.html(self.allocator()); + if (std.meta.hasMethod(T, "html")) break :blk try raw.html(self.allocator()); @compileError("cannot convert " ++ @typeName(T) ++ " into " ++ @typeName(Element)); }; self.content.append(&el.node().node); -- cgit v1.2.3