> The document in Google Docs is a Canvas. This is only mostly true, and no justification at that. I’ll just quote myself from a couple of years ago https://news.ycombinator.com/item?id=42253177 >: > Google Docs isn’t pure-canvas: they only switched their document area to use it for layout. Text rendering is still browser (necessary to keep performance even close ), and all the rest of the UI is still DOM. Having tho…
> Take the humble element, for example. With it, you get crispy rendering at any resolution, support for tab, focus, selection, mouse interactions and arrow key navigation, internationalization for right-to-left text and Asian compound characters, accessibility for screen readers… the list goes on.
This is a poor choice of example for “why wouldn’t you use Canvas”, because even pure-canvas apps will use a backing for text input (probably invisible, hopefully appropriately positioned), because that’s the most primitive thing there is in this way; you cannot emulate it.
—⁂—
The rest of the article is fairly reasonable, showing some of the important considerations and why doing it to acceptable quality is more complex than people often imagine, because you’re basically reinventing a sizeable subset of what the browser already offers; and you can’t do as good a job of it in various areas, and are unlikely to do as good a job in most of the rest.
I’d say: things like Canva and Google Maps should obviously use canvas; things like Google Docs and Sheets should almost certainly not. I see enough of their product to see why they would choose canvas, but I’m not yet convinced that HTML only wouldn’t have served them better, and I strongly suspect that, if not, HTML + SVG would have been a better choice than HTML + canvas (and I hope they’re not pure canvas, because that’s an irredeemably bad approach for the foreseeable future of browsers).