The Future Web: Will Canvas Rendering Replace the DOM?

Google Docs leads the way to an app-focused future

Matthew MacDonald
Young Coder
Published in
6 min readMay 17, 2021

--

There’s been a lot of hand-wringing recently about Google’s decision to use the HTML <canvas> for all of its rendering in Google Docs. And the concern is understandable. Once upon a time the web was supposed to be system for sharing carefully structured information, full of sensible metadata and collaboration. Instead, we turned it into an semi-opaque app delivery model running in a browser sandbox.

Google’s decision — to switch from writing HTML elements on a page to painting pixels on a canvas — isn’t anything developers haven’t seen before. Other leading-edge web apps already reach far beyond the traditional confines of HTML elements. Google Maps has been rendering on the canvas for years. VS Code uses it to draw a pixel-perfect terminal. And then there’s Google’s emerging Flutter toolkit, which lets you build a cross-platform UI that renders through the canvas by default in a web browser.

But somehow, this time feels different. There’s a sense that canvas rendering, combined with other developments like WebAssembly, have taken us past a tipping point. It now feels like the familiar pattern — downloading plaintext JavaScript code and executing it against an inspectable HTML document — might just be a brief stop in the ever-evolving road of web development.

Or to put it another way, we take it for granted that we can read the code we’re running, examine the markup we’re seeing, and review the CSS that styles it. But all these aspects of web development may be nothing more than a brief and transient anomaly in the history of software design.

So what happens now?

The canvas rendering approach will spread

There’s a saying: Where Google goes, others follow.

Roughly 15 years ago, Google was a trailblazer with asynchronous JavaScript calls (then called AJAX). They pioneered techniques for Gmail and Google Maps that later became a foundational part of web development. Now, Google’s shift to drawing UI on a canvas will legitimatize the approach for a new generation of web developers.

--

--

Matthew MacDonald
Young Coder

Teacher, coder, long-ago Microsoft MVP. Author of heavy books. Join Young Coder for a creative take on science and technology. Queries: matthew@prosetech.com