b7bf5f5fe38c86f40a531b92065866b0401e5551
This patch include a breaking change to the recorder's event data. We used to consider mirror.getId will always return the id of the target node because we keep serialize every node. But if we call mirror.getId before serialization then bug happened. This could happen when we get nextId of newly added nodes if its next sibling was also newly added. So we have to return -1 as the id of node which was not serialized and when we building added nodes in the replayer we should handle this. For example, nodes el1, el2 were added together and el1's nextId will be -1 since el2 was not serialized at that moment. Now we call el1 as a 'missing next node' and not append it into the DOM tree after building, instead we store it in a missingNextNodeMap. After a added node in the same mutation was successfully appened we will check whether it has a previous id and the id was pointed to some nodes in the map, if so, we will insert that node before it and delete the node from map.
rrweb
Not ready yet
Languages
TypeScript
66.5%
JavaScript
25.8%
HTML
6.3%
Svelte
1.2%
CSS
0.2%