Fix ending .} of pragmas (#39)

This commit is contained in:
konqoro 2017-09-17 19:16:30 +03:00 • committed by Andreas Rumpf
commit 79d0b21cb3
3 changed files with 7 additions and 7 deletions

View file

@ -23,7 +23,7 @@ proc ajax(meth, url: cstring; headers: openarray[(cstring, cstring)];
proc statechange(r: HttpRequest; cb: proc()) {.importcpp: "#.onreadystatechange = #".} proc statechange(r: HttpRequest; cb: proc()) {.importcpp: "#.onreadystatechange = #".}
proc send(r: HttpRequest; data: cstring) {.importcpp: "#.send(#)".} proc send(r: HttpRequest; data: cstring) {.importcpp: "#.send(#)".}
proc open(r: HttpRequest; meth, url: cstring; async: bool) {.importcpp: "#.open(@)".} 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 var this {.importc: "this".}: ThisObj
let ajax = newRequest() let ajax = newRequest()

View file

@ -583,7 +583,7 @@ proc javaEnabled*(h: Navigator): bool
# ClassList "methods" # ClassList "methods"
proc add*(c: ClassList, class: cstring) proc add*(c: ClassList, class: cstring)
proc remove*(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) proc toggle*(c: ClassList, class: cstring)
# Style "methods" # Style "methods"
@ -644,9 +644,9 @@ type
proc getBoundingClientRect*(e: Node): BoundingRect {. proc getBoundingClientRect*(e: Node): BoundingRect {.
importcpp: "getBoundingClientRect", nodecl.} importcpp: "getBoundingClientRect", nodecl.}
proc clientHeight*(): int {. proc clientHeight*(): int {.
importcpp: "(window.innerHeight || document.documentElement.clientHeight)@", nodecl} importcpp: "(window.innerHeight || document.documentElement.clientHeight)@", nodecl.}
proc clientWidth*(): int {. proc clientWidth*(): int {.
importcpp: "(window.innerWidth || document.documentElement.clientWidth)@", nodecl} importcpp: "(window.innerWidth || document.documentElement.clientWidth)@", nodecl.}
proc inViewport*(el: Node): bool = proc inViewport*(el: Node): bool =
let rect = el.getBoundingClientRect() let rect = el.getBoundingClientRect()

View file

@ -2,9 +2,9 @@
## This module contains wrappers for the HTML 5 local storage. ## This module contains wrappers for the HTML 5 local storage.
proc getItem*(key: cstring): cstring {.importc: "localStorage.getItem"} proc getItem*(key: cstring): cstring {.importc: "localStorage.getItem".}
proc setItem*(key, value: cstring) {.importc: "localStorage.setItem"} proc setItem*(key, value: cstring) {.importc: "localStorage.setItem".}
proc hasItem*(key: cstring): bool {.importcpp: "(localStorage.getItem(#) !== null)".} 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".} proc removeItem*(key: cstring) {.importc: "localStorage.removeItem".}