File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -100,24 +100,24 @@ template reRenderTmpl*() =
100
100
var
101
101
current = document.querySelector(" [data-" & self.uniqCompId & " ]" )
102
102
elements = newSeq[Element]()
103
- for tag in compTmpData.children :
103
+ for tag in compTmpData.childNodes :
104
104
if not current.isNil:
105
105
elements.add(current)
106
106
current = current.nextSibling.Element
107
107
# echo elements.len
108
108
for i in countdown(elements.len-1, 0, 1):
109
109
let
110
110
elem = elements[i]
111
- tag = compTmpData.children [i]
111
+ tag = compTmpData.childNodes [i]
112
112
parent = elem.parentElement
113
113
idx = index(elem)
114
- length = parent.children .len
114
+ length = parent.childNodes .len
115
115
# echo idx, ", ", length
116
116
elem.remove()
117
117
if length-1 == idx:
118
118
parent.appendChild(tag)
119
119
else:
120
- parent.insertBefore(tag, parent.children [idx])
120
+ parent.insertBefore(tag, parent.childNodes [idx])
121
121
if activeElement.hasAttribute("id"):
122
122
let actElem = document.getElementById(activeElement.id)
123
123
if not actElem.isNil:
Original file line number Diff line number Diff line change @@ -344,8 +344,7 @@ proc addArgIter*(self: TagRef, arg: string) =
344
344
# #
345
345
# # See also `addArg function #addArg,TagRef,string`_
346
346
when defined(js):
347
- if self.attributes.len == 0 :
348
- self.setAttribute(cstring (arg), " " )
347
+ self.setAttribute(cstring (arg), " " )
349
348
else :
350
349
if self.args.len == 0 :
351
350
self.args.add(arg)
You can’t perform that action at this time.
0 commit comments