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]-->
§368 · May 4, 2007 · JavaScript, Microsoft, QuickLinks, Software, SVG, Technology, Web · · [Print]

Leave a Comment to “Sam Ruby: Inline SVG in IE”

  1. Sam Ruby says:

    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).