]> Something Witty Goes Here

codedread

Sam Ruby: Inline SVG in IE

May 4th, 2007

Thanks, Sam for kicking this off - I knew it was just a matter of time before someone would do a proof-of-concept, but the week of MIX07 was earlier than I expected! :)

One suggestion: If you’re going to use simple IE detection, then why not use IE conditional comments rather than forcing other SVG-capable browsers to load and parse and run the JavaScript? Something like:

<!--[if IE]>
  <script type="text/javascript" src="SVG2SL.js"></script>
<![endif]-->

2 Responses to “Sam Ruby: Inline SVG in IE”

  1. The problem is that IE conditional comments are ignored by other browsers, meaning that that script will always be included.

    If all goes well, I’ll likely use a technique such as the following:

    http://www.phpied.com/javascript-include/

  2. Actually, Sam, the script will NEVER be included in other browsers (the whole thing looks like a comment to any browser but IE).

Leave a Reply

This is the captcha image, please contact me if you cannot see it

codedread codedread