Inline rendering with document.currentScript

27 points by carlana


freddyb

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

Or just use setHTML :)

kchanqvq

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

BasicallyEternity

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.