Fix ending .} of pragmas (#39)
This commit is contained in:
parent
c324793f62
commit
79d0b21cb3
3 changed files with 7 additions and 7 deletions
|
|
@ -23,7 +23,7 @@ proc ajax(meth, url: cstring; headers: openarray[(cstring, cstring)];
|
|||
proc statechange(r: HttpRequest; cb: proc()) {.importcpp: "#.onreadystatechange = #".}
|
||||
proc send(r: HttpRequest; data: cstring) {.importcpp: "#.send(#)".}
|
||||
proc open(r: HttpRequest; meth, url: cstring; async: bool) {.importcpp: "#.open(@)".}
|
||||
proc newRequest(): HttpRequest {.importcpp: "new XMLHttpRequest(@)",}
|
||||
proc newRequest(): HttpRequest {.importcpp: "new XMLHttpRequest(@)".}
|
||||
|
||||
var this {.importc: "this".}: ThisObj
|
||||
let ajax = newRequest()
|
||||
|
|
|
|||
|
|
@ -583,7 +583,7 @@ proc javaEnabled*(h: Navigator): bool
|
|||
# ClassList "methods"
|
||||
proc add*(c: ClassList, class: cstring)
|
||||
proc remove*(c: ClassList, class: cstring)
|
||||
proc contains*(c: ClassList, class: cstring):bool
|
||||
proc contains*(c: ClassList, class: cstring): bool
|
||||
proc toggle*(c: ClassList, class: cstring)
|
||||
|
||||
# Style "methods"
|
||||
|
|
@ -644,9 +644,9 @@ type
|
|||
proc getBoundingClientRect*(e: Node): BoundingRect {.
|
||||
importcpp: "getBoundingClientRect", nodecl.}
|
||||
proc clientHeight*(): int {.
|
||||
importcpp: "(window.innerHeight || document.documentElement.clientHeight)@", nodecl}
|
||||
importcpp: "(window.innerHeight || document.documentElement.clientHeight)@", nodecl.}
|
||||
proc clientWidth*(): int {.
|
||||
importcpp: "(window.innerWidth || document.documentElement.clientWidth)@", nodecl}
|
||||
importcpp: "(window.innerWidth || document.documentElement.clientWidth)@", nodecl.}
|
||||
|
||||
proc inViewport*(el: Node): bool =
|
||||
let rect = el.getBoundingClientRect()
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
## This module contains wrappers for the HTML 5 local storage.
|
||||
|
||||
proc getItem*(key: cstring): cstring {.importc: "localStorage.getItem"}
|
||||
proc setItem*(key, value: cstring) {.importc: "localStorage.setItem"}
|
||||
proc getItem*(key: cstring): cstring {.importc: "localStorage.getItem".}
|
||||
proc setItem*(key, value: cstring) {.importc: "localStorage.setItem".}
|
||||
proc hasItem*(key: cstring): bool {.importcpp: "(localStorage.getItem(#) !== null)".}
|
||||
proc clear*() {.importc: "localStorage.clear"}
|
||||
proc clear*() {.importc: "localStorage.clear".}
|
||||
|
||||
proc removeItem*(key: cstring) {.importc: "localStorage.removeItem".}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue