-
Some time ago, assuming it couldn't easily be done client-side, I wrote a microservice to convert HTML to SVG (labs.steren.fr/2020/05/08/screenshot-as-svg/). But here is a browser extension to do the same client side: github.com/felixfbecker/svg-screenshots. The "magic" comes from the "dom-to-svg" node module.