Inspired by Emil’s emulation of the
canvas tag in IE, I put together a simple SVG emulation behavior for IE. As with Emil’s code, I am making use of Internet Explorer’s VML support. The behavior will walk the SVG element structure and attempt to convert to appropriate VML elements. It’s far from complete, but it does a decent job. Supported features include:
- Basic shapes: rect, ellipse, circle, polyline, polygon and path.
- Simple fills commands (in attributes and CSS): fill and fill-opacity.
- Simple stroke commands (in attributes and CSS): stroke, stroke-width, stroke-opacity and stroke-linejoin.
svg namespace. This seems to be a requirement for the behavior to work, but I am trying to remove the need.
The sample files are exactly the same, only the extensions are different. Firefox must have Inline-SVG in an XHTML file. There is probably a way I can get Apache to trick Firefox into thinking the HTML file is an XHTML file (or get IE to think the XHTML file is an HTML file), but I haven’t got it working yet.
Update: Core files have been updated. Test files have gradient examples.