-
Notifications
You must be signed in to change notification settings - Fork 84
Description
Our html tagged template literal could be better. For example, it could support event listeners, style objects, and automatic escaping of text. And maybe we might also want a mechanism to do efficient updates, too.
There’s a lot of related open-source work in this area, to boot, particularly around hyperscript. Here’s a proof of concept, but there are lots of other libraries to consider (see the awesome-hyperscript list):
https://observablehq.com/d/1c3d8d85581a6bc9
The hard part here is that we can’t do this in a backwards-compatible way. So either we’ll need to introduce standard library versioning (which fortunately is easy relative to runtime versioning), or we’ll need to choose a new name, e.g. htm
(but that won’t work for svg
obviously). Either way it’s a bit tricky to change the behavior of a core standard library component.