Use SVG with Vaadin today without losing IE support.
SvgComponent helps to use of SVG in Vaadin. Plain Embedded supports SVG as well, but SvgComponent has some enhancements like simple client-server communication and IE support.
The SVG can be provided as Resource via Embedded.setSource(Resource). The SvgComponent also has helper methods setSvg(String) and setSvg(InputStream).
IE9 uses solely its built-in SVG rendering like other modern browsers.
NOTE, the svgweb fallback requires mime type mapping for .htc file. This is easily achieved eg. in java servers by adding following snippet to your web.xml
<mime-mapping> <extension>htc</extensionglt; <mime-type>text/x-component</mime-type> </mime-mapping>
The component also provides a simple messaging mechanism from SVG to the wrapping SvgComponent. See SvgMessageListener.
- Better IE9 support via its native SVG rendering.
- updated svgweb library to the latest release. Previously a customized version was used to overcome an iframe issue, latest svgweb release includes this fix.