MenTaLguY wrote:
Most likely runmode would need to create a copy of the document and run from/display that instead of the original working copy.
I agree. I think we talked about this earlier. Runmode would clone the SVG internal tree (and its SPObject display), either the repr stuff or eventually your AST tree, bind a Javascript tree to it, run it, then delete. In fact, this would fit nicely into a "Preview" mode, where what we are selling is not what it is, but how it looks.
Otherwise it's too inconvenient if the script (by design or accident) heavily modifies the SVG file.
Yeah. Probably the ECMA binding should make no permanent change to the SVG tree. Save this for the scripting of the Inkscape editor itself, much like the Gimp's Script-Fu stuff.