File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
examples/web_app_multi_client Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 11const std = @import ("std" );
22const webui = @import ("webui" );
3+ const builtin = @import ("builtin" );
34
45// general purpose allocator
56var gpa = std .heap .GeneralPurposeAllocator (.{}){};
@@ -40,7 +41,11 @@ fn saveAll(e: *webui.Event) void {
4041 public_input = allocator .dupe (u8 , publicInput ) catch unreachable ;
4142
4243 // general new js
43- const js = std .fmt .allocPrintSentinel (
44+ const js = if (builtin .zig_version .minor == 14 ) std .fmt .allocPrintZ (
45+ allocator ,
46+ "document.getElementById(\" publicInput\" ).value = \" {s}\" ;" ,
47+ .{publicInput },
48+ ) catch unreachable else std .fmt .allocPrintSentinel (
4449 allocator ,
4550 "document.getElementById(\" publicInput\" ).value = \" {s}\" ;" ,
4651 .{publicInput },
You can’t perform that action at this time.
0 commit comments