This is somewhat outside the scope of GoJS, and it might be different for every browser.
You might have to experiment. Searching yields examples like this, where a person encodes their SVG and then sets it as an <img> source, and lets the user download the .svg. There are probably more complete examples out there.