summaryrefslogtreecommitdiff
path: root/web/static
diff options
context:
space:
mode:
Diffstat (limited to 'web/static')
-rw-r--r--web/static/dartboat.js24
1 files changed, 10 insertions, 14 deletions
diff --git a/web/static/dartboat.js b/web/static/dartboat.js
index 44daabb..4edba8a 100644
--- a/web/static/dartboat.js
+++ b/web/static/dartboat.js
@@ -37,6 +37,10 @@ function elemSetContent(sel, str) {
$(UTF8ToString(sel)).textContent = str ? UTF8ToString(str) : '';
}
+function elemSetValue(sel, str) {
+ $(UTF8ToString(sel)).value = str ? UTF8ToString(str) : '';
+}
+
function elemHasClass(sel, c) {
return $(UTF8ToString(sel)).classList.contains(UTF8ToString(c));
}
@@ -65,15 +69,6 @@ function elemScrollToBottom(sel) {
e.scrollTop = e.scrollHeight;
}
-function promptHandle(command, data) {
- const str_c = toCString(command);
- const str_d = data && toCString(data);
- _prompt_handle(str_c, str_d);
-
- _free(str_c);
- if (str_d) _free(str_d);
-}
-
function elemAppendElemv(sel, elemc, elemv, off_ns, off_name, off_content,
off_n_attrs, off_attr_names, off_attr_vals) {
const target = $(UTF8ToString(sel));
@@ -102,12 +97,13 @@ function elemAppendElemv(sel, elemc, elemv, off_ns, off_name, off_content,
}
}
-function updateDelay(val) {
- $('#delay').value = val;
-}
+function promptHandle(command, data) {
+ const str_c = toCString(command);
+ const str_d = data && toCString(data);
+ _prompt_handle(str_c, str_d);
-function updateStdev(val) {
- $('#stdev').value = parseFloat(val.toFixed(2).slice(0, 4));
+ _free(str_c);
+ if (str_d) _free(str_d);
}
function setOpt(opt, val, update_opts = true) {