SVG in IE (Update)

I made some changes to the IESVG behavior. I am trying to get better feature coverage without making the rendering too slow. I have been testing the code using some SVG images from different places, trying to figure out what parts of SVG seem to be more important than others. Recents chanegs include:

  • Basic support for gradient fills. It’s pretty weak and may have not SVG-correct.
  • Basic support for svg:g elements.
  • Switched code to use DOM methods (appendChild and replaceChild) instead of slower, string-based methods.

I plan to add more support for gradients. I also plan to add some scripting support. You can do scripting now, but you need to treat the elements as VML, not SVG. I plan to add some methods to the VML elements to make them appear more SVG-like when scripting.

Files can be downloaded from here. I added the SVG lion to the samples:

Sample files: lion.htm (IE), lion.xhtml (Firefox)

Update: Fixed 404 on link above.


  1. KevLinDev Blog » Blog Archive » JSDrawing Now Supports VML said,

    March 21, 2006 @ 12:33 am

    […] I was reading through some of today’s posts over at svg-developers and I came across Mark Finkle’s blog post about his SVG in IE project. He has a nice demo showing a client-side conversion of SVG to VML via behaviors. In an earlier post, he mentions that he was inspired by Emil Eklund’s Canvas in IE project. (It seems like everyone’s transcoding these days). I had been wanting to add VML as a supported renderers, so with the help of these two fine examples, I added VML support today: […]

  2. stelt said,

    March 21, 2006 @ 12:50 am

    here=404, please let me know when fixed

  3. Mitchell Santine Gould said,

    March 21, 2006 @ 2:28 am

    My two cents (for what it’s worth)

  4. Jacobus said,

    March 29, 2006 @ 1:17 pm

    Good day,

    This is really a good solution to many problems relating to SVG support under IE. Is there any plans to support svg events and more importantly Viewboxes?

    Thanks a stack and keep it up! You are my new hero!

  5. sm said,

    March 29, 2006 @ 4:25 pm

    What if you access a standalone SVG with XMLHTTPRequest?

  6. Something Witty Goes Here » Blog Archive » Cross-Browser Drawing API Lands said,

    April 1, 2006 @ 1:50 am

    […] Now that all 4 major browsers (IE, Firefox 1.5, Opera 9 and Safari) can do the Canvas thing, this should lead to some really interesting times. I hope they join forces with Mark Finkle and use the same cross-browser drawing API to get SVG fully implemented in IE. Me? I’ll just sit back and watch the magic happen. […]

  7. Arun said,

    April 8, 2006 @ 12:27 pm

    Mark, its good piece of code.
    I want to know whether this will support event handling using javascript.

  8. Something Witty Goes Here » Blog Archive » SVG News Digest: 2006-04-13 said,

    April 13, 2006 @ 4:45 pm

    […] Mark Finkle has been doing some fantastic work on converting VML to SVG. His latest creation is a similar rich-graphics editor similar to ajaxSketch called RichDraw which apparently works in IE 6, Firefox 1.5 and Opera 9. […]

RSS feed for comments on this post