I have an SVG with embedded custom elements which are used by _javascript_ within the SVG. These custom elements happen to have style attributes with custom styles defined.

 

When using Batik 1.6, the style.getProperty(name) method and indeed other style methods only return data for any style property names which are known to Batik.

 

From the CSSStyleDeclaration documentation:

 

“While an implementation may not recognize all CSS properties within a CSS declaration block, it is expected to provide access to all specified properties in the style sheet through the CSSStyleDeclaration interface.”

 

Batik does not appear to do this; am I missing something? I can parse the style in JS myself for now but I have to use the “style” attribute value, since style.cssText also only includes property names known to Batik.

 

Thanks

 

Graham.

 

P.S. moving the style properties onto real node attributes would be much more work in this case than parsing the style attribute in JS.

 

Reply via email to