Skip to content

Instantly share code, notes, and snippets.

@lennym
Created August 15, 2012 15:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lennym/3361176 to your computer and use it in GitHub Desktop.
Save lennym/3361176 to your computer and use it in GitHub Desktop.
How to get an SVG file inline in a page in IE9
iframe = document.createElement('iframe');
iframe.src = asset.svg;
iframe.onload = _.bind(function () {
this.$el.append(iframe.contentDocument.getElementsByTagName('svg')[0]);
document.body.removeChild(iframe);
ready();
}, this);
document.body.appendChild(iframe);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment