For roughly two decades, web developers building 3D or canvas-heavy experiences have faced a brutal fork in the road: use the DOM for rich, accessible, interactive UI, or use Canvas for fast GPU-accelerated graphics. Pick one. The other side of that fork just got paved over. At Google I/O 2026, Chrome engineer Thomas Nattestad unveiled the HTML-in-Canvas API, a new web platform feature that lets developers render HTML elements directly into canvas, WebGL, and WebGPU contexts while preserving accessibility and interactivity.

A hack that accumulated tens of thousands of GitHub stars

Before this API, the workaround was libraries like html2canvas and dom-to-image. These libraries accumulated tens of thousands of GitHub stars not because they were good solutions, but because they were the only solutions. They work by taking screenshots of the DOM, reimplementing CSS layout and paint in JavaScript, then dumping the result to an image.

The output is a frozen snapshot, not live content. The failure modes are well-documented and painful: external images fail due to CORS restrictions, video and SVG elements render blank, and complex UIs can take 20 seconds or more to capture. These were not bugs in the libraries. They were fundamental limitations of the approach, since the browser's layout engine is simply not exposed to JavaScript.

Canvas content has always been opaque to assistive technology. WCAG compliance in any canvas-heavy UI required duplicating content in hidden DOM elements, which is fragile and expensive to maintain. The HTML-in-Canvas API eliminates that entirely.

What the API actually does

Alpha Signal

Don't miss what's next in AI

Join 300,000+ engineers and researchers who get the signal, not the noise.

  • Full access to in-depth AI research breakdowns
  • Be the first to know what's trending before it hits mainstream
  • Daily curated papers, repos, and industry moves