You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Michael Ford <mi...@spidasoftware.com> on 2012/06/29 16:54:16 UTC

JSVGCanvas setSVGDocument doesn't load scripts... but setURI does?

I am generating this simple SVG document in code, with some basic onClick() scripting logic. When I call setSVGDocument with the document I have created,  the visuals load fine but when I click on anything I get an "Unknown Language: text/ecmascript" error.

If I take this exact same SVGDocument, output it to a file, and then load it into the canvas using setURI, the scripts execute without error.

I I am not attempting to edit the SVGDocument from my java code after it is loaded, only through the javascript. JSVGCanvas.ALWAYS_DYNAMIC is set before I start loading.

I am using the Batik 1.7 release and Rhino 1.7RC2, also on maven.  JDK 1.6 on OS X.

I have included the image I am trying to load.

I can obviously do the simple input handling I need to in java, but I was hoping to make the SVG aspect of this application reusable in our web apps directly.

Thanks,

-Michael Ford
Spidasoftware