Comment by agumonkey
3 years ago
I wonder why there's never been a
<calc> /* ... compute and return dom element */ </calc>
Basically what php does but with structure and objects instead of a bytestream
in HTML. Or maybe it's been discussed but got left out
It's always been possible:
<script>document.write(`<p>foo</p>`)</script>
Good point, but it's very different in terms of thinking. Same as structural versus string macros in programming languages.
You can do it with custom elements, e.g.
For something like: