diff options
Diffstat (limited to 'src/z/Component.zig')
| -rw-r--r-- | src/z/Component.zig | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/z/Component.zig b/src/z/Component.zig index 70d6e1d..408a76b 100644 --- a/src/z/Component.zig +++ b/src/z/Component.zig @@ -6,6 +6,7 @@ const Object = @import("Object.zig"); const Self = @This(); +namespace: []const u8 = "app", name: []const u8, html: Fragment, css: []const u8, @@ -172,7 +173,7 @@ pub fn toElement(self: *const Self) []const Element { .{}, &.{.text( std.fmt.comptimePrint( - \\customElements.define("app-{s}", class extends HTMLElement {{ + \\customElements.define("{s}-{s}", class extends HTMLElement {{ \\ constructor() {{ \\ super(); \\ this.attachShadow({{ mode: 'open' }}); @@ -189,7 +190,7 @@ pub fn toElement(self: *const Self) []const Element { \\ }}); \\ }} \\}}) - , .{ self.name, self.name, self.name }), + , .{ self.namespace, self.name, self.name, self.name }), )}, ), }; |