Does the SWT.MOZILLA browser widget have SVG support?

There is a SWT Browser Widget in eclipse RCP for HTML and Javascript rendering. I have tested Eclipse 3.5.2 and am trying to open SVG embedded in HTML via SWT.MOZILLA Browser, it was successful. But if I paste the svg code directly into the html tag it fails. To run SWT.MOZILLA I am using XulRunner 1.9.2.19. So SWT Browser (MOZILLA, WEBKIT, NONE) doesn't have SVG support? I know there is an alternative using raphael.js . But currently my program is using SVG file (s) provided by another program and I don't think converting SVG using raphael.js is an easy task.

UPDATE: There is readysetraphael.com that can convert SVG file to raphael.js file, but for some reason it cannot convert SVG.

+3


source to share


1 answer


Firefox 3.6 (corresponds to XULRunner 1.9.2) is quite old, it only has basic SVG support. It supports inline SVG, but you will need to use XHTML (properly served with a MIME type application/xhtml+xml

on the web or with an extension .xhtml

on your disk) and fix the namespaces. Support for inline SVG in regular HTML files was only added with the HTML5 parser in Firefox 4 (which is XULRunner 2.0 compliant). Firefox 3.6 also doesn't support SVG on an element <img>

, you will need to use <iframe>

or <embed>

.



+2


source







All Articles