summaryrefslogtreecommitdiff
path: root/web/web_opts.c
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-05-04 15:16:56 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-05-04 15:16:56 -0700
commitdf307f86ad32fcc841c770e8f5af72e8c0b80cfb (patch)
tree1881655a210d183ef775c1427906c765c1b14240 /web/web_opts.c
parentba56ae56ebec73ca8ea966fde4bb385f911a6669 (diff)
downloaddartboat-df307f86ad32fcc841c770e8f5af72e8c0b80cfb.tar.gz
dartboat-df307f86ad32fcc841c770e8f5af72e8c0b80cfb.tar.xz
web: abstract away most EM_ASM calls to dom file
Diffstat (limited to 'web/web_opts.c')
-rw-r--r--web/web_opts.c5
1 files changed, 3 insertions, 2 deletions
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)