From a1dc55be6e695a1c04e5e9e0f1ce7406a5dd3dff Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Thu, 15 Oct 2026 11:25:14 +0200 Subject: add function struct to register js functions dynamically --- src/app/components/navbutton/root.zig | 1 + src/app/root.zig | 1 + 2 files changed, 2 insertions(+) (limited to 'src/app') diff --git a/src/app/components/navbutton/root.zig b/src/app/components/navbutton/root.zig index 3505840..f2b71e6 100644 --- a/src/app/components/navbutton/root.zig +++ b/src/app/components/navbutton/root.zig @@ -1,4 +1,5 @@ const std = @import("std"); +const app = @import("root").app; const zilch = @import("zilch"); const Self = @This(); diff --git a/src/app/root.zig b/src/app/root.zig index d172b23..25865d2 100644 --- a/src/app/root.zig +++ b/src/app/root.zig @@ -11,6 +11,7 @@ const components = @import("components/root.zig").components; pub const app: zilch.App(.{ .name = "Memora", + .functions = &zilch.Object.functions, .globals = &.{ zilch.Object.global(.window), zilch.Object.global(.Object), -- cgit v1.2.3-70-g09d2