DEV Community

loading...

Discussion on: Vanilla JavaScript and HTML - No frameworks. No libraries. No problem.

Collapse
john_papa profile image
John Papa Author

Thanks. Yeah, documentFragment could be very helpful when you assemble a DOM tree outside of the page (to avoid reflow). Then attach it when ready.

Collapse
themightyt_v3 profile image
theMightiestT

or a template string?

Thread Thread
john_papa profile image
John Papa Author

sure. template strings with innerHTML work, and it's the first thing I showed here. or do yuo mean something else?

Thread Thread
themightyt_v3 profile image
theMightiestT

nope i DID miss it... I was looking for it further down in your example code but you had it covered :)

Thread Thread
john_papa profile image