fix: can't record SVG element inside iframe properly (#843)
el instanceof SVGElement is false if the svg element is inside iframe so that the isSVG property is missing in the recorded data
This commit is contained in:
@@ -219,7 +219,7 @@ export function absoluteToDoc(doc: Document, attributeValue: string): string {
|
||||
}
|
||||
|
||||
function isSVGElement(el: Element): boolean {
|
||||
return el.tagName === 'svg' || el instanceof SVGElement;
|
||||
return Boolean(el.tagName === 'svg' || (el as SVGElement).ownerSVGElement);
|
||||
}
|
||||
|
||||
function getHref() {
|
||||
|
||||
Reference in New Issue
Block a user