- When done, throw everything away. Why? You
probably don't want the script to modify the document you are editing.
Generally you dont but once you have learnt enough Javascript one might want to use a script as a macro to change all the rects to ellipses (or something) or otherwise add to the image and save the resulting page. I've done this quite a bit to generate new web pages, but mozilla doesn't make it easy if you want to see what you code (there is a buried protocol called wyciwyg//:: which gives you the generated page that was briefly exposed in some of the nightly builds and I found it very useful but they buried it again within weeks).
I expect I'll want to use Javascript to repeat things and generate patterns (svg <patterns> that is) without needing to use the <use> tag or have lots of transformations, i like to try and specify abosolute coordinates for everything.
Obviously it is not the correct default but hopefully you can make so that it is possible to save the modified page?
Hope that makes sense
Sincerely
Alan H.