Mutation (attribute & text) duplicate info elimination (#1269)
* Add a test which demonstrates how no mutations are generated when an element is created & destroyed in the same 'cycle' (a cylce here being enforced by freezePage) * Test demonstrating current behaviour I'm about to modify; the data-test="x" attribute is present twice in the mutation, as is the textContent value of 'y' * Attribute or text modifications on just-added nodes are redundant as demonstrated in test case * Some correct test changes from other tests; I've manually inspected each of these mutation removals and confirmed that the attribute values are already present in the newly added nodes elsewhere in the same mutation * Improve reliability of test case as per Justin's advice
This commit is contained in:
5
.changeset/attribute-text-reductions.md
Normal file
5
.changeset/attribute-text-reductions.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'rrweb': patch
|
||||
---
|
||||
|
||||
Don't include redundant data from text/attribute mutations on just-added nodes
|
||||
Reference in New Issue
Block a user