Downloading svg files created in the browser

I think a port can work here. you can render your solution to the dom, then use a port and some javascript to extract the html content and send that as a string to elm. Be sure to wrap your javascript code in a requestAnimationFrame to make sure you only extract the content once it’s rendered.

It’s not a great solution, but because you want to download the file I think it’s workable. You need a Msg type and update anyway for the downloads.