Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Catch calls to iframe content document #222

Merged
merged 3 commits into from
Nov 19, 2024

Conversation

chargome
Copy link
Member

@chargome chargome self-assigned this Nov 15, 2024
@chargome
Copy link
Member Author

@mydea does it make sense to extend this to all packages in this repo?

@billyvg
Copy link
Member

billyvg commented Nov 15, 2024

@mydea does it make sense to extend this to all packages in this repo?

Yeah we probably want it for all packages

Comment on lines 462 to 470
export function getIframeContentDocument(iframe?: HTMLIFrameElement) {
try {
if (iframe) {
return iframe.contentDocument;
}
} catch (e) {
// noop
}
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicated it here to not create a new dependency

@chargome chargome requested a review from billyvg November 18, 2024 08:10
packages/rrdom/src/util.ts Outdated Show resolved Hide resolved
packages/rrdom/src/util.ts Outdated Show resolved Hide resolved
@chargome chargome merged commit 45e3d0b into sentry-v2 Nov 19, 2024
16 checks passed
@chargome chargome deleted the cg/catch-iframe-content-document branch November 19, 2024 08:39
billyvg added a commit to getsentry/sentry-javascript that referenced this pull request Dec 5, 2024
Includes the following fixes:

- fix: Catch calls to iframe content document ([#222](getsentry/rrweb#222))
- fix(snapshot): Fix CSS expansion of add CSS property ([#223](getsentry/rrweb#223))
billyvg added a commit to getsentry/sentry-javascript that referenced this pull request Dec 6, 2024
Includes the following fixes:

- fix: Catch calls to iframe content document
([#222](getsentry/rrweb#222))
- fix(snapshot): Fix CSS expansion of add CSS property
([#223](getsentry/rrweb#223))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed to read the 'contentDocument' property on older browsers => broken page
3 participants