Closed Ketec closed 3 years ago
It's not really clear to me how this differs from onSVGLoaded
. Do you have a more concrete example (or pseudocode)?
It also sounds like you might want to just preprocess your SVGs before using them in your app anyway.
I would like to do some sanitation/cleanup on the SVG-s before it is cached - so I don't have to do it every time in the
onSVGLoaded
.Dealing with a larger number of icons etc coming from design, they leave sometimes junk in there or conflicting data. Like
<defs>
for styles with some standard class name that now becomes global and cause conflicts. In this case, I would like to move the contents of defs outside into local scope for the svg.This could also be a property - when you inline svg, last thing you want is for it to inject global styles, filter etc with duplicate names.