Browse Source

Added a first version of `data-autoset`

tags/0.2.0
Florian Bouillon 2 months ago
parent
commit
aab4c0bc66
Signed by: Avior <florian.bouillon@delta-wings.net> GPG Key ID: B143FF27EF555D16
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      FormManager.ts

+ 10
- 0
FormManager.ts View File

@@ -167,6 +167,16 @@ export default class FormManager {

//Setup the system for basic inputs
this.setupInputs()

setInterval(() => {
this.form.querySelectorAll("[data-autoset]").forEach((el: HTMLInputElement) => {
let autosetStr = el.dataset.autoset
if (autosetStr.startsWith("run:")) {
let tmp = autosetStr.split("run:")[1]
el.value = eval(tmp)
}
})
}, 500)
}

/**


Loading…
Cancel
Save