1.0.0 • Published 10 years ago
svg-sprite-injector v1.0.0
svg-sprite-injector
Async load svg-sprites
Inspired by http://osvaldas.info/caching-svg-sprite-in-localstorage
Usage
Just simply call
svgSpriteInjector('sprite.svg');Cache by localStorage
svgSpriteInjector('sprite.svg', {
revision: 1 // Revision identifier
});Params in DOM
svgSpriteInjector(document.body);<body data-svg-sprite="sprite.svg" data-svg-sprite-revision="1">
<div></div>
</body>Combine separated SVG's
For combine svg files into one with elements use gulp-svgstore or grunt-svgstore
License
Copyright © 2015 Bogdan Chadkin
1.0.0
10 years ago