You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sprite.prototype.appendSymbol = function (content) {
var symbol = this.wrapSVG(content, Sprite.symbolTemplate()).childNodes[0];
this.svg.querySelector('defs').appendChild(symbol); // append symbol when runtime
if (this.browser.name === 'firefox') {
FirefoxSymbolBugWorkaround(this.svg);
}
};
svg-sprite-loader v2.0.4
Sprite.prototype.add = function add (symbol) {
var ref = this;
var symbols = ref.symbols;
var existing = this.find(symbol.id);
if (existing) {
symbols[symbols.indexOf(existing)] = symbol;
return symbol;
}
symbols.push(symbol);
// fix start
if(ref.isMounted){
// ref.node.appendChild(parse(symbol.content)); // it's not work. why?
ref.node.insertAdjacentHTML('beforeend', symbol.content); // it's work
}
// fix end
return symbol;
};
The text was updated successfully, but these errors were encountered:
svg-sprite-loader v0.3.1
svg-sprite-loader v2.0.4
The text was updated successfully, but these errors were encountered: