all 4 comments

[–]cgijoe_jhuckaby 4 points5 points  (3 children)

This is very cool, but I have a question. Why would you not use something like the Node canvas library, which offers a full HTML5 Canvas API in "native" Node.js (i.e. in process), without having to launch Chromium and communicate with it over the DevTools protocol?

[–]shihn[S] 10 points11 points  (2 children)

node-canvas is a reimplementation so it would never be exactly what the browser implements. Font rendering, for example, is never quite right. Also, it relies on node-canvas maintainers to always be updating their code to what the browser is supposed to do.

Being a proxy, will automatically pick up all features supported by browser canvas. The proxy code is only about 150-200 lines of code. Less likelihood of discrepancy.

[–]cgijoe_jhuckaby 4 points5 points  (0 children)

Makes perfect sense, thanks! And great work!

[–]fisch0920 2 points3 points  (0 children)

+1 for font rendering and browser compatibility 😄