From 5efc2958bb5664588d5d2c5406034facdc689f56 Mon Sep 17 00:00:00 2001 From: bptato Date: Fri, 3 Jan 2025 22:00:42 +0100 Subject: dom: add option value setter, input checked setter --- src/html/dom.nim | 48 ++++++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 22 deletions(-) (limited to 'src/html') diff --git a/src/html/dom.nim b/src/html/dom.nim index c326bbad..26ffc2c9 100644 --- a/src/html/dom.nim +++ b/src/html/dom.nim @@ -2609,7 +2609,7 @@ proc sheets*(document: Document): seq[CSSStylesheet] = func checked*(input: HTMLInputElement): bool {.inline.} = return input.internalChecked -proc setChecked*(input: HTMLInputElement; b: bool) {.inline.} = +proc setChecked*(input: HTMLInputElement; b: bool) {.jsfset: "checked".} = input.invalidDeps.incl(dtChecked) input.internalChecked = b @@ -3061,6 +3061,31 @@ proc showPicker(this: HTMLSelectElement): Err[DOMException] {.jsfunc.} = #TODO add, remove +#