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

This commit is contained in:
Razvan Sandu
2026-04-01 12:00:00 +08:00
committed by yz-yu
parent ad816f7b7f
commit 149c78802a

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
}