Y
Hacker News
new
|
ask
|
show
|
jobs
by
renegadus
2743 days ago
Hmm, it seems to be adding things to a list but where is it adding a new DOM node?
1 comments
Matthias247
2743 days ago
I would say in
for x in lines: tdiv: text x
Whenever the DOM gets rerendered, it iterates over the the lines (or the "model" in general), and creates DOM elements from it. At least it looks very similar to React and Angular code, and they do exactly this.
link
renegadus
2743 days ago
Ah, you're right. Ok, I think I can do that fairly concisely in Kweb also, if I find a bit of time.
link