From df307f86ad32fcc841c770e8f5af72e8c0b80cfb Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Wed, 4 May 2022 15:16:56 -0700 Subject: web: abstract away most EM_ASM calls to dom file --- web/web_opts.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'web/web_opts.c') diff --git a/web/web_opts.c b/web/web_opts.c index c156598..f255a83 100644 --- a/web/web_opts.c +++ b/web/web_opts.c @@ -1,3 +1,4 @@ +#include "web_dom.h" #include "web_opts.h" #include "comp.h" @@ -68,7 +69,7 @@ void opts_init() char buf[64]; sprintf(buf, "%d", delay_ms); - EM_ASM({elemSetValue($0, $1)}, "#delay", buf); + dom_elem_set_value("#delay", buf); int len = sprintf(buf, "%4.2f", horizontal_stdev); char *dot = strchr(buf, '.'); @@ -79,7 +80,7 @@ void opts_init() *ptr = 0; } } - EM_ASM({elemSetValue($0, $1)}, "#stdev", buf); + dom_elem_set_value("#stdev", buf); } void store_opt(char *opt, char *val) -- cgit v1.2.3-70-g09d2