lib/svgsaver.js
function cloneSvg(src, attrs, styles) {
  var clonedSvg = src.cloneNode(true);

  domWalk(src, clonedSvg, function (src, tgt) {
    if (tgt.style) {
      (0, _computedStyles2['default'])(src, tgt.style, styles);
    }
  }, function (src, tgt) {
    if (tgt.style && tgt.parentNode) {
      cleanStyle(tgt);
    }
    if (tgt.attributes) {
      cleanAttrs(tgt, attrs, styles);
    }
  });

  return clonedSvg;
}
function cloneSvg(src, attrs, styles) {
  var clonedSvg = src.cloneNode(true);

  domWalk(src, clonedSvg, function (src, tgt) {
    if (tgt.style) {
      (0, _computedStyles2['default'])(src, tgt.style, styles);
    }
  }, function (src, tgt) {
    if (tgt.style && tgt.parentNode) {
      cleanStyle(tgt);
    }
    if (tgt.attributes) {
      cleanAttrs(tgt, attrs, styles);
    }
  });

  return clonedSvg;
}
function cloneSvg ( src , attrs , styles ) { var clonedSvg = src . cloneNode ( true ) ; domWalk ( src , clonedSvg , function ( src , tgt ) { if ( tgt . style ) { ( 0 , _computedStyles2 [ 'default' ] ) ( src , tgt . style , styles ) ; } } , function ( src , tgt ) { if ( tgt . style && tgt . parentNode ) { cleanStyle ( tgt ) ; } if ( tgt . attributes ) { cleanAttrs ( tgt , attrs , styles ) ; } } ) ; return clonedSvg ; }
Clones an SVGElement, copies approprate atttributes and styles.
Clones an SVGElement copies approprate atttributes and styles .