News for hackers. Stuff that matters.
Re:Show HN: I created snapDOM to capture DOM nodes as images... by tinchox6 on Sunday April 27, 2025 @01:44PM (#43813761)
Thank you for testing it out and sharing the screenshots!

I’ve run some performance tests using Vitest Bench, and SnapDOM was faster. I also created a few manual demos, and SnapDOM won in both speed and accuracy.

That said, I still need to run more real-world tests. So, thanks again for your help!

Re:Show HN: I created snapDOM to capture DOM nodes as images... by hirako2000 on Sunday April 27, 2025 @03:10PM (#43814341)
How can svg be faster, and especially more accurate (lets throw some IMG or CSS shadows for fun) than canvas?
Re:Show HN: I created snapDOM to capture DOM nodes as images... by kaoD on Sunday April 27, 2025 @03:41PM (#43814538)
You can embed HTML in an SVG via foreignObject. Seems like that's exactly what the library is doing[0].

Whether that's faster or more reliable, I don't know. Seems likely to render different depending on where you view the SVG (especially out of browsers).

[0]: https://github.com/search?q=repo%3Azumerlab%2Fsnapdom%20fore...

Re:Show HN: I created snapDOM to capture DOM nodes as images... by tinchox6 on Monday April 28, 2025 @03:49PM (#43825314)
I'm working on enabling a special full mode for those who don't mind the final size:

https://github.com/zumerlab/snapdom/issues/1