Skip to content

Commit 32f0910

Browse files
kidandcatAraq
authored andcommitted
scrollTop must be settable (#13263)
* scrollTop must be assignable Make scrollTop settable * add missing export
1 parent a716543 commit 32f0910

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/js/dom.nim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1270,6 +1270,7 @@ proc inViewport*(el: Node): bool =
12701270
rect.right <= clientWidth().float
12711271

12721272
proc scrollTop*(e: Node): int {.importcpp: "#.scrollTop", nodecl.}
1273+
proc `scrollTop=`*(e: Node, value: int) {.importcpp: "#.scrollTop = #", nodecl.}
12731274
proc scrollLeft*(e: Node): int {.importcpp: "#.scrollLeft", nodecl.}
12741275
proc scrollHeight*(e: Node): int {.importcpp: "#.scrollHeight", nodecl.}
12751276
proc scrollWidth*(e: Node): int {.importcpp: "#.scrollWidth", nodecl.}

0 commit comments

Comments
 (0)