Skip to content

loadSVGFromURL

loadSVGFromURL(url, reviver?, options?): Promise<SVGParsingOutput>

Defined in: src/parser/loadSVGFromURL.ts:21

Takes url corresponding to an SVG document, and parses it into a set of fabric objects. Note that SVG is fetched via XMLHttpRequest, so it needs to conform to SOP (Same Origin Policy)

string

where the SVG is

TSvgReviverCallback

Extra callback for further parsing of SVG elements, called after each fabric object has been created. Takes as input the original svg element and the generated FabricObject as arguments. Used to inspect extra properties not parsed by fabric, or extra custom manipulation

LoadImageOptions = {}

Object containing options for parsing

Promise<SVGParsingOutput>

fabric