ember-svg-jar
Version:
Best way to use SVG images in Ember applications
15 lines (14 loc) • 396 B
HTML
<script>
var ajax = new XMLHttpRequest();
ajax.open('GET', '{{SYMBOLS_URL}}', true);
ajax.send();
ajax.onload = function (e) {
if (this.status === 404) {
return;
}
var div = document.createElement('div');
div.innerHTML = ajax.responseText;
div.dataset.testSvgJarSymbols = true;
document.querySelector('{{SYMBOLS_SELECTOR}}').appendChild(div);
};
</script>