Add checked to dom (#18033)
This allows the ability to set a checkbox as checked programmatically. It's different from `setAttribute` because once an input has been clicked on by the user, `setAttribute` no longer works programmatically.
This commit is contained in:
parent
2096490b59
commit
e904c6d87c
1 changed files with 3 additions and 0 deletions
|
|
@ -1379,6 +1379,9 @@ proc `class=`*(n: Node; v: cstring) {.importcpp: "#.className = #", nodecl.}
|
|||
proc value*(n: Node): cstring {.importcpp: "#.value", nodecl.}
|
||||
proc `value=`*(n: Node; v: cstring) {.importcpp: "#.value = #", nodecl.}
|
||||
|
||||
proc checked*(n: Node): bool {.importcpp: "#.checked", nodecl.}
|
||||
proc `checked=`*(n: Node; v: bool) {.importcpp: "#.checked = #", nodecl.}
|
||||
|
||||
proc `disabled=`*(n: Node; v: bool) {.importcpp: "#.disabled = #", nodecl.}
|
||||
|
||||
when defined(nodejs):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue