some dom proc correction and complement (#10684)

This commit is contained in:
liuxiaodong
2019-02-16 00:43:22 +08:00
committed by Andreas Rumpf
parent bb9fe2046e
commit 2610b16f6e

View File

@@ -192,7 +192,7 @@ type
Element* = ref ElementObj
ElementObj {.importc.} = object of NodeObj
classList*: Classlist
classList*: ClassList
checked*: bool
defaultChecked*: bool
defaultValue*: cstring
@@ -1183,9 +1183,10 @@ proc contains*(c: ClassList, class: cstring): bool
proc toggle*(c: ClassList, class: cstring)
# Style "methods"
proc getAttribute*(s: Style, attr: cstring, caseSensitive=false): cstring
proc removeAttribute*(s: Style, attr: cstring, caseSensitive=false)
proc setAttribute*(s: Style, attr, value: cstring, caseSensitive=false)
proc getPropertyValue*(s: Style, property: cstring): cstring
proc removeProperty*(s: Style, property: cstring)
proc setProperty*(s: Style, property, value: cstring, priority = "")
proc getPropertyPriority*(s: Style, property: cstring): cstring
# Event "methods"
proc preventDefault*(ev: Event)
@@ -1267,6 +1268,10 @@ proc inViewport*(el: Node): bool =
rect.right <= clientWidth().float
proc scrollTop*(e: Node): 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.}
proc offsetHeight*(e: Node): int {.importcpp: "#.offsetHeight", nodecl.}
proc offsetWidth*(e: Node): int {.importcpp: "#.offsetWidth", nodecl.}
proc offsetTop*(e: Node): int {.importcpp: "#.offsetTop", nodecl.}
proc offsetLeft*(e: Node): int {.importcpp: "#.offsetLeft", nodecl.}