Skip to content

SVGInject

SVG 파일을 DOM에 인라인으로 삽입하기 위한 작고 직관적이며 강력한 캐싱 솔루션입니다.

한마디로

SVG 파일을 <img>에서 사용할 때, object 로 제어할 수 있도록 한다.

SVG Injection

Element before injection:

<img src="image.svg" onload="SVGInject(this)" />

Element after injection (SVG loaded from image.svg):

<svg version="1.1" ...> ... </svg>

See also

Favorite site