Get the latest tech news

What should a native DOM templating API look like?


f you read my previous post, The time is right for a DOM templating API, you might be wondering what such an API would look like. Let's dive into that question now.

Compared to a more JavaScript-oriented solution, it was more code to implement, had more custom concepts and cognitive overhead, slower in many cases, and created a division between JavaScript and template lexical environments that added friction to development. lit-html was our response to those issues, still working within our constraints of no required compiler, no forking the web's core languages, and potentially standardizable features and API shapes. In fact, I'm not aware of a client-side templating library that meets these constraints and requirements and doesn't look a lot like lit-html (or HyperHTML or htm or FAST).

Get the Android app

Or read this on Hacker News

Read more on:

Photo of API

API

Photo of dom

dom

Related news:

News photo

Modelling API rate limits as diophantine inequalities

News photo

OpenAI’s API lead explains how enterprises are already succeeding with its Agents SDK and Responses API

News photo

The time is right for a DOM templating API