Get the latest tech news
The time is right for a DOM templating API
L;DR: I want to propose adding a declarative templating API to the web platform. Here's why...
While the largest reason for this is the web's reach, it wouldn't be possible without the DOM API, which turns a mostly static document viewer into a highly dynamic and expressive runtime. Declarative interpolation - plus features that go beyond plain HTML, like event listeners and property setting - help preserve the locality of behavior, making templates much easier to write and read than imperative code. While early DOM templating proposals didn't include updating, userland systems have thoroughlyexplored the landscape by now, and discovered good mental models and better and worse implementation approaches.
Or read this on Hacker News