Skip to content
Chrome for Developers·

💻HTML-in-Canvas API Now in Origin Trial in Chrome 148-150

Draw DOM Elements Directly in Canvas, Keep UI Interactive

TL;DR

The HTML-in-Canvas API lets you draw DOM elements directly into a 2D canvas or WebGL/WebGPU texture, keeping the UI interactive and accessible. Available in Chrome 148-150 origin trial.

The HTML-in-Canvas API is now available in origin trial in Chrome 148 through 150, allowing developers to draw DOM elements directly into a 2D canvas or WebGL/WebGPU texture. This API keeps the UI fully interactive and accessible, integrating seamlessly with browser features like accessibility tools, translate, and find-in-page. Developers can now create rich, interactive interfaces with minimal custom UI logic, reducing bundle size and improving performance. The API is enabled in Chrome Canary 149 with the chrome://flags/#canvas-draw-element flag.

HTML-in-Canvas API Now in Origin Trial in Chrome 148-150 — Chrome for Developers

Key Points

1

HTML-in-Canvas API available in Chrome 148-150 origin trial

2

Draw DOM elements directly into 2D canvas or WebGL/WebGPU textures

3

Keeps UI fully interactive and accessible, integrates with browser features

4

Requires setting up canvas, rendering into canvas, updating CSS transform

5

Available in Chrome Canary 149 with chrome://flags/#canvas-draw-element

Why It Matters

If you're building large canvas-based applications or 3D scenes, the HTML-in-Canvas API lets you draw DOM elements directly into a canvas, keeping the UI interactive and accessible. This reduces the need for complex custom UI logic, improving performance and user experience. Developers can now create rich, interactive interfaces with minimal overhead.

HTML-in-CanvasChromeWebGLWebGPUCanvas

Comments

Subscribe to join the conversation...

Be the first to comment

Enjoyed this article?

Get it daily. 7am. Free. Reads in 5 minutes.

Join 3,568 builders reading daily.

Also get