From 1fa19361aa40ba286816acab996ea7979f18059b Mon Sep 17 00:00:00 2001 From: Kurogoma Date: Mon, 8 Jan 2024 21:49:02 +0900 Subject: [PATCH] Always autosubmit --- interactive/index.html | 5 ----- interactive/src/slim_ui.ts | 6 +----- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/interactive/index.html b/interactive/index.html index f29d5f1..968e0a7 100644 --- a/interactive/index.html +++ b/interactive/index.html @@ -127,10 +127,6 @@

Slim (in JavaScript)

-
- - -

使い方

diff --git a/interactive/src/slim_ui.ts b/interactive/src/slim_ui.ts index 14511c6..950efbd 100644 --- a/interactive/src/slim_ui.ts +++ b/interactive/src/slim_ui.ts @@ -19,9 +19,6 @@ controlnames.forEach((controlname, i) => { }); }); (pform.elements.namedItem("text") as HTMLInputElement).addEventListener("keyup", anonchgf); -(pform.elements.namedItem("autosubmit") as HTMLInputElement).addEventListener("change", () => { - if ((pform.elements.namedItem("autosubmit") as HTMLInputElement).checked) anonchgf(); -}); function getFormValues(): InputParam { return Object.fromEntries(controlnames.map((controlname, i) => [controlname, parseFloat(controls[i].value)])) as InputParam; @@ -42,8 +39,7 @@ function limForm(name?: keyof InputParam) { function controlchgf_maker(name?: keyof InputParam) { return () => { limForm(name); - if ((pform.elements.namedItem("autosubmit") as HTMLInputElement).checked) - formsubfunc(); + formsubfunc(); }; } const formsubfunc = () => {