about summary refs log tree commit diff stats
path: root/src/html
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2022-09-16 03:46:13 +0200
committerbptato <nincsnevem662@gmail.com>2022-09-16 03:48:36 +0200
commit23caa878a3854dd0118792e1c051b5412ec345cc (patch)
tree0294ecb329765ed7f8960182224f397c46407580 /src/html
parent3f96681261692feedadfb8c488f3908dd80bb01c (diff)
downloadchawan-23caa878a3854dd0118792e1c051b5412ec345cc.tar.gz
Rename jsget/jsset to jsfget/jsfset for functions
The original idea was to use the same pragmas as object members, but
unfortunately this doesn't seem to work consistently after all.
Diffstat (limited to 'src/html')
-rw-r--r--src/html/dom.nim10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/html/dom.nim b/src/html/dom.nim
index 278a4c5e..acfe2a22 100644
--- a/src/html/dom.nim
+++ b/src/html/dom.nim
@@ -228,7 +228,7 @@ iterator children_rev*(node: Node): Element {.inline.} =
       yield Element(child)
 
 #TODO TODO TODO this should return a live view instead
-proc children*(node: Node): seq[Element] {.jsget.} =
+proc children*(node: Node): seq[Element] {.jsfget.} =
   for child in node.children:
     result.add(child)
 
@@ -448,14 +448,14 @@ func attrb*(element: Element, s: string): bool =
     return true
   return false
 
-func innerHTML*(element: Element): string {.jsget.} =
+func innerHTML*(element: Element): string {.jsfget.} =
   for child in element.childNodes:
     result &= $child
 
-func outerHTML*(element: Element): string {.jsget.} =
+func outerHTML*(element: Element): string {.jsfget.} =
   return $element
 
-func textContent*(node: Node): string {.jsget.} =
+func textContent*(node: Node): string {.jsfget.} =
   case node.nodeType
   of DOCUMENT_NODE, DOCUMENT_TYPE_NODE:
     return "" #TODO null
@@ -756,7 +756,7 @@ func text*(option: HTMLOptionElement): string =
       if child.parentElement.tagType != TAG_SCRIPT: #TODO svg
         result &= child.data.stripAndCollapse()
 
-func value*(option: HTMLOptionElement): string {.jsget.} =
+func value*(option: HTMLOptionElement): string {.jsfget.} =
   if option.attrb("value"):
     return option.attr("value")
   return option.childTextContent.stripAndCollapse()