Inline rendering with document.currentScript

27 points by carlana 21 hours ago on lobsters | 3 comments

freddyb | 10 hours ago

Reminder: If using innerHTML or outerHTML, sanitise the HTML first, especially if you fetched it externally!

Or just use setHTML :)

kchanqvq | 15 hours ago

Cool trick! Love to see fellow human who still enjoys cute code in this age!

BasicallyEternity | 11 hours ago

I really like the counter example. It's close in abstraction to how code in a "modern", component based js framework would look like, but much lighter and built in.