load-svg

1.0.0 • Public • Published

load-svg

load an svg element over xhr

example

var loadsvg = require('load-svg');
 
loadsvg('wizard_hat.svg', function (err, svg) {
    document.body.appendChild(svg);
});

methods

var loadsvg = require('load-svg')

loadsvg(opts, cb)

Load an svg asynchronously over xhr and construct the svg dom element. cb(err, svg) fires with the svg dom element.

opts can be a string uri or an option argument that is passed through to the xhr module.

install

With npm do:

npm install load-svg

license

MIT

Readme

Keywords

Package Sidebar

Install

npm i load-svg

Weekly Downloads

27

Version

1.0.0

License

MIT

Last publish

Collaborators

  • nopersonsmodules