Skip to content

Conversation

@YunFeng0817
Copy link
Member

@YunFeng0817 YunFeng0817 commented Jan 12, 2023

To improve the robustness of the virtual-dom implementation imported in #853 and fix some common errors such as #1042

Changes:

  1. Add node type check in the diff function
    Now node matching doesn't only rely on the equality of serialized Ids
  2. Fix a wired style problem in iframes
    https://rrwebdebug.com/play/index.html?url=https%3A%2F%2Fgist.github.com%2FMark-Fenng%2Fdd95c2246c948ac1bda1c67336210fb1&version=1.0.0-alpha.4&play=on

image

image

Thanks for @pdwittig 's really helpful events
This bug is because class selector matching in auto-mounted iframes is case-insensitive.

  1. fix [Bug]: Replayer Exception - mutation Failed to execute 'insertBefore' on 'Node': Only one doctype on document allowed #1065 including a test case
  2. add afterAppend hook to the diff function
    fix: virtual nodes are passed to plugin's onBuild callback

@bhavitsharma Could you please also review this PR in case I'm missing anything important? Since you have followed some related problems and you are also familiar with the code.

@YunFeng0817 YunFeng0817 marked this pull request as ready for review February 1, 2023 13:16
@YunFeng0817 YunFeng0817 requested a review from Juice10 February 1, 2023 14:20
@bhavitsharma
Copy link

Sure. Give me a day and I'll get back to ya.

Copy link
Member

@Juice10 Juice10 left a comment

Choose a reason for hiding this comment

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

This is great @Mark-Fenng, much more readable!

@Juice10 Juice10 merged commit 4ee86fe into master Feb 9, 2023
@Juice10 Juice10 deleted the rrdom-improve branch February 9, 2023 09:10
@wfk007
Copy link
Contributor

wfk007 commented Feb 10, 2023

@Mark-Fenng Thanks for your great work andafterAppend hook is really helpful for me to write plugins in the replay.

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.

[Bug]: Replayer Exception - mutation Failed to execute 'insertBefore' on 'Node': Only one doctype on document allowed

5 participants