Created
August 15, 2012 15:55
-
-
Save lennym/3361176 to your computer and use it in GitHub Desktop.
How to get an SVG file inline in a page in IE9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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