forked from iconic/SVGInjector
-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Hi, when multiple instances of SVGInjector are processing various elements with the same URL, an error upon calling replaceChild() on a null object appears, but the element is inserted properly.
Updated examples/simple.html:
<svg class="icon icon--thumb inject-me" data-src="assets/svg/thumb-up.svg" title="I like it!" alt="thumb" onclick="console.log('clicked');"/>
<svg class="icon icon--thumb test-me" data-src="assets/svg/thumb-up.svg" title="I like it!" alt="thumb" onclick="console.log('clicked');"/>
<svg class="icon icon--thumb fetch-me" data-src="assets/svg/thumb-up.svg" title="I like it!" alt="thumb" onclick="console.log('clicked');"/>
<script src="../src/svg-injector.js"></script>
<script>
new SVGInjector().inject(document.querySelectorAll('.inject-me'));
new SVGInjector().inject(document.querySelectorAll('.test-me'));
new SVGInjector().inject(document.querySelectorAll('.fetch-me'));
</script>Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels