summary refs log tree commit diff stats
path: root/lib/js
diff options
context:
space:
mode:
authorJairo <kidandcat@gmail.com>2020-01-27 09:14:56 +0100
committerAndreas Rumpf <rumpf_a@web.de>2020-01-27 09:14:56 +0100
commit32f0910f11acd88b10422d6dc20477747cda687d (patch)
tree7f8fa1692a5005dbe7e4ce102317fa451242df5c /lib/js
parenta71654323d33a5a3dc41a68d5a791ff4ae6c9e69 (diff)
downloadNim-32f0910f11acd88b10422d6dc20477747cda687d.tar.gz
scrollTop must be settable (#13263)
* scrollTop must be assignable

Make scrollTop settable

* add missing export
Diffstat (limited to 'lib/js')
-rw-r--r--lib/js/dom.nim1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/js/dom.nim b/lib/js/dom.nim
index ff5165ca5..cd78f5560 100644
--- a/lib/js/dom.nim
+++ b/lib/js/dom.nim
@@ -1270,6 +1270,7 @@ proc inViewport*(el: Node): bool =
            rect.right <= clientWidth().float
 
 proc scrollTop*(e: Node): int {.importcpp: "#.scrollTop", nodecl.}
+proc `scrollTop=`*(e: Node, value: int) {.importcpp: "#.scrollTop = #", nodecl.}
 proc scrollLeft*(e: Node): int {.importcpp: "#.scrollLeft", nodecl.}
 proc scrollHeight*(e: Node): int {.importcpp: "#.scrollHeight", nodecl.}
 proc scrollWidth*(e: Node): int {.importcpp: "#.scrollWidth", nodecl.}