Skip to content

🔥 remove mutation freeze logic#802

Merged
BenoitZugmeyer merged 2 commits intomasterfrom
benoit/cleanup-freeze
Apr 23, 2021
Merged

🔥 remove mutation freeze logic#802
BenoitZugmeyer merged 2 commits intomasterfrom
benoit/cleanup-freeze

Conversation

@BenoitZugmeyer
Copy link
Member

Motivation

This logic was introduced to allow RRWeb users to "pause" the recording
by using the public method freezePage. This method has been removed in
PR #727, and it appears that the freeze logic is now unneeded: since
the "fullsnapshot" logic is synchronous, no DOM mutation can happen or
be processed while the document snapshot is taken.

Changes

Remove mutation 'freeze' logic. Because mutations still need to be flushed before a "fullsnapshot" is taken, the MutationController have been kept, and flush / onFlush methods have been introduced.

Testing

CI, manual


I have gone over the contributing documentation.

This logic was introduced to allow RRWeb users to "pause" the recording
by using the public method `freezePage`. This method has been removed in
PR #727, and it appears that the `freeze` logic is now unneeded: since
the "fullsnapshot" logic is synchronous, no DOM mutation can happen or
be processed while the document snapshot is taken.
@BenoitZugmeyer BenoitZugmeyer requested a review from a team as a code owner April 22, 2021 09:53
Copy link
Collaborator

@bcaudan bcaudan left a comment

Choose a reason for hiding this comment

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

Nice 🔥

@BenoitZugmeyer BenoitZugmeyer merged commit c23c9c0 into master Apr 23, 2021
@BenoitZugmeyer BenoitZugmeyer deleted the benoit/cleanup-freeze branch April 23, 2021 12:15
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.

2 participants