Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
quickthrower2
· 4y ago · 0 comments
Modulo performance, why not store the html string in JS if you are going to use JS anyway, and with string interpolation it is more templatey anyway.
Comments
[–]
xigoi
4y ago
With templates, you can do things like template.querySelector("label").
[–]
quickthrower2
OP
4y ago
True! that would be less elegant with the string, as you would need to make it effectively into a <template> or hidden div to do such a thing.