Don't throw away information about the iframe src (#733)
* Don't throw away information about the iframe src * contentDocument is the important one as to whether we are recording an iframe directly
This commit is contained in:
@@ -509,7 +509,12 @@ function serializeNode(
|
||||
}
|
||||
// iframe
|
||||
if (tagName === 'iframe' && !keepIframeSrcFn(attributes.src as string)) {
|
||||
delete attributes.src;
|
||||
if (!(n as HTMLIFrameElement).contentDocument) {
|
||||
// we can't record it directly as we can't see into it
|
||||
// preserve the src attribute so a decision can be taken at replay time
|
||||
attributes.rr_src = attributes.src;
|
||||
}
|
||||
delete attributes.src; // prevent auto loading
|
||||
}
|
||||
return {
|
||||
type: NodeType.Element,
|
||||
|
||||
Reference in New Issue
Block a user