Allow rendering image tags inside svgs during replay (#13)

This commit is contained in:
Razvan Sandu
2019-05-23 13:18:10 +03:00
committed by yz-yu
parent 5697c689d9
commit 9b0c92fd67

View File

@@ -109,7 +109,11 @@ function buildNode(n: serializedNodeWithId, doc: Document): Node | null {
continue;
}
try {
node.setAttribute(name, value);
if (n.isSVG && name === 'xlink:href') {
node.setAttributeNS('http://www.w3.org/1999/xlink', name, value);
} else {
node.setAttribute(name, value);
}
} catch (error) {
// skip invalid attribute
}