SMRTR ProgrammingMay 6, 2026lobste.rs

Canvas-ing the Web

SMRTR summary

Chrome recently shipped a flag-gated HTML-in-canvas API, letting you render styled HTML and CSS inside a canvas element — and then export it as an image. A developer used it to build a one-click banner download button for an internal tool, but hit real snags: recursive connectedCallback stack overflows and canvas sizing mismatches, each requiring creative workarounds involving moveBefore() and dynamic resizing.

SMRTR provides this summary for quick context. The original article belongs to lobste.rs.

Read the original article
SMRTR Programming

Get the next batch of curated stories in your inbox.

This archive is built from SMRTR newsletter stories. Subscribe for hand-picked stories without the extra noise.

Related Stories

Browse Programming
ProgrammingAug 25, 2026

The End of Programming

AI rewrote Bun's entire JavaScript runtime—one million lines of code in eleven days—for ~$165,000, with minimal human involvement. As AI-generated code surges exponentially,...