Hacker News new | ask | show | jobs
by deckard1 1414 days ago
you're still in the SPA. You generally need some sort of painters algorithm to repaint the canvas anyway. When the canvas comes back you would just repaint it from JS memory.

Canvas in particular has issues web devs have to deal with beyond their "normal" duties. Accessibility is simply not even a thing in canvas. Google Docs had to implement an entire parallel invisible DOM structure to emulate what they draw on the canvas when they were switching over to the canvas. And, of course, that DOM structure has to be in sync with canvas.

1 comments

Sure. But in that case I think a modal makes more sense. A page with a complex canvas that has state ideally should be the last page in the SPA navigation. Nothing should be able to "go back" to that page. What you describe is more a way to "go forward" to that page, since you're essentially reloading the canvas (which is fine but adds overhead in terms of state and response time)