Skip to content

fix: init rrweb with load event or with document.readyState #1089

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

Merged
merged 1 commit into from
Apr 9, 2025

Conversation

amertak
Copy link
Contributor

@amertak amertak commented Apr 8, 2025

Description

When rrweb is loaded, it checks if document.readyState is complete or interactive. If not it attaches event handler to the load event.

However when load event is emitted thru 3rd party code then rrweb initializes event handlers again without proper clean up.

Solution is to initialize rrweb like it directly goes to init and not attaches itself to the load event.

image

Type of change

Delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How has this been tested?

  • Manual testing

@amertak amertak requested review from a team as code owners April 8, 2025 13:21
@amertak amertak merged commit 478f586 into main Apr 9, 2025
10 checks passed
@amertak amertak deleted the fix/rrweb-load-handlers branch April 9, 2025 13:27
@github-actions github-actions bot locked and limited conversation to collaborators Apr 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants