News for hackers. Stuff that matters.
Re:What if we'd had better HTML-in-JS syntax all along? by enjikaka on Friday May 15, 2020 @09:12AM (#23191761)
In Webact I did a small tagged template literal with createContextualFragment. Very smooth.

https://github.com/enjikaka/webact/blob/master/src/helpers.j... https://github.com/enjikaka/webact/blob/master/src/helpers.j...

  html`<b>Hello world</b>`

returns a document fragment that you can just appendChild with. Super simple.

There are no comments on this comment yet.