using to replace existing elements without src attr
Opened this issue · 2 comments
robbyking3 commented
In our app we are using <span class="icon icon-name"></span>
with an icon font. I was thinking of trying to switch over to using SVGs and thus came here.
For our current structure is it possible to let it remain as it is, but then I would map the class names to their corresponding SVGs and replace them using SVGInjector?
Great work on this btw.
Cheers
markadrake commented
I'd break up these responsibilities.
Use JavaScript to find your .icon
elements and tag on the data-src
attribute. Then initialize the SVGInjector. I think that would work no?
robbyking3 commented
ah yeah, that might work. I'll try it out. Thanks.