3 ms·
We should probably be making widget toolkits for the Canvas and using WebSockets for communication. DOM manipulation is a total hack-job. It's somewhat flexible
by netbioserror 1y ago
We should probably be making widget toolkits for the Canvas and using WebSockets for communication. DOM manipulation is a total hack-job. It's somewhat flexible, but the performance and dark-pattern cost is just too great. If you're making an interactive application, then treat it like an application and draw widgets to a canvas.
- christophilus 1y agoAccessibility suffers with that approach.
- extra88 1y agoIt doesn't just suffer it's impossible unless you recreate the whole thing with actual HTML behind the <canvas> rendered version.
- ioseph 1y agoThis is an insane take, show me a responsive button with hover state and a tooltip implemented in the canvas that outperforms a button rendered with React.
- rc1 1y agoFigma?
- zelphirkalt 1y agoDon't forget about the privacy cost associated with the canvas. If this ever becomes widespread, we will have many many sites extract browser fingerprinting information from the canvas. It would then move the game one more step towards dystopia, where we have to analyze and block certain ways of code interacting with the canvas and it might even prove impossible. And then incapable web devs will offer you no solution but canvas buttons for the login to your bank account. No, I don't think this is the way forward.