Skip to content

[Bug]: Uncaught TypeError: setting getter-only property "attributeName" #1194

@njindal1501

Description

@njindal1501

Preflight Checklist

  • I have searched the issue tracker for a bug report that matches the one I want to file, without success.

What package is this bug report for?

rrweb

Version

[email protected]

Expected Behavior

This issue should not be thrown.

Actual Behavior

Receiving this error again and again for iframe.

Steps to Reproduce

I am getting this issue when opened a file in iframe.
When debugged the issue, I found that this issue was coming from the below code snippet in 'rrweb/src/record/mutation.ts:516'
"" if (
target.tagName === 'IFRAME' &&
m.attributeName === 'src' &&
!this.keepIframeSrcFn(value as string)
) {
if (!(target 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
m.attributeName = 'rr_src';
} else {
return;
}
} ""

Testcase Gist URL

No response

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions