“Skia also has an experimental SVG back-end, and that’s what we’re going to use to build html2svg!”
The trick is that Chrome already draws everything through Skia, and Skia can already emit SVG. So he forked Chromium and pointed the renderer at the SVG back end. The hard parts were ligatures and an SVG canvas that only closes its tags in a destructor. Forking a browser sounds insane. It’s less insane than writing a renderer.