Get the latest tech news

Rethinking DOM from first principles


Rethinking DOM from first principles

CSS has also gained the ability to round corners, draw gradients, and apply arbitrary clipping masks: it clearly has SVG-envy, but falls very short. While it might seem useful, the only reason the API has the shape that it does is because it's shoehorned into the DOM: elements must be descendants of<canvas> to fully participate in layout and styling, and to make accessibility work. The whole reason to do "complex UIs on canvas" is to do all the things the DOM doesn't do, like virtualizing content, just-in-time layout and styling, visual effects, custom gestures and hit-testing, and so on.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of HTML

HTML

Photo of live html

live html

Related news:

News photo

HTML-in-Canvas

News photo

The Chrome Speculation Rules API allows the browser to preload and prerender

News photo

Show HN: The HTML Maze – Escape an eerie labyrinth built with HTML pages