Skip to content
Open
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
43c5d72
Iterate over the added nodes in 'one pass' so that we don't need to b…
eoghanmurray Feb 10, 2025
ed757b3
Test changes, rearrangement of mutations
eoghanmurray Feb 10, 2025
1d8b37b
Add some ids as I'm interested in tracing these nodes through pushAdd…
eoghanmurray Feb 10, 2025
99da1e4
Do away with the second pass as we can handle shadow DOM in the first…
eoghanmurray Feb 10, 2025
490aea9
Performance oriented refactor focusing on scenario where a large numb…
eoghanmurray Feb 11, 2025
d9587d4
Satisfy typescript which could be smarter here ... we can guarantee t…
eoghanmurray Feb 11, 2025
2a0eedd
Utilize `lastChild` to avoid possibly crawling through hundreds of nodes
eoghanmurray Feb 11, 2025
96ea20d
We've already got `nextSibling` here so can skip a step and avoid the…
eoghanmurray Feb 11, 2025
2aa8597
Test rearrangements in the adds array due to new algorithm; should be…
eoghanmurray Feb 11, 2025
8d4e766
We were calling `inDom` in all cases, so don't do the other ancestor …
eoghanmurray Feb 11, 2025
3b33611
Don't think we're explicitly looking at the slimdom stuff in relation…
eoghanmurray Feb 11, 2025
f260c0d
Add changeset
eoghanmurray Feb 11, 2025
87b091a
Don't think `main` subfolder was ever used as an output target; this …
eoghanmurray Feb 11, 2025
1441ef3
Placate eslint (`while(true)` is a Pythonism rather than do..while) -…
eoghanmurray Feb 11, 2025
b5b04e2
Forgot to add the mutation.html file - also add doctype
eoghanmurray Feb 11, 2025
720e174
Simplify the parentId check, doesn't need to ever by null
eoghanmurray Feb 11, 2025
c166319
Move mutation tests into their own files to demonstrate an idea which…
eoghanmurray Feb 12, 2025
4a751ee
Apply formatting changes
eoghanmurray Feb 12, 2025
7734331
Some inconsequential tests to cover blocking scenarios
eoghanmurray Feb 12, 2025
4c2af79
Was trying to 'catch out' the mutation handling by having siblings pr…
eoghanmurray Feb 12, 2025
8b27440
fixup! Move mutation tests into their own files to demonstrate an ide…
eoghanmurray Feb 12, 2025
453beb0
I can't recreate a scenario for this case in testing, so add a warnin…
eoghanmurray Feb 12, 2025
03f2146
Put each snap file in it's own folder and shorten names
eoghanmurray Feb 12, 2025
9666d32
Satisfy eslint
eoghanmurray Feb 13, 2025
e90b18b
Repeat the mutation tests but with the blocking/ignored nodes already…
eoghanmurray Mar 7, 2025
9a7a47e
Indicate that replay no longer needs the queue, as added nodes should…
eoghanmurray Mar 7, 2025
f9f660c
Merge branch 'master' into pushAddOrder
Juice10 Sep 5, 2025
7d39bbc
Update packages/rrweb/src/replay/index.ts
eoghanmurray Sep 5, 2025
0b0d662
Update packages/rrweb/src/record/mutation.ts
eoghanmurray Sep 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update packages/rrweb/src/record/mutation.ts
Co-authored-by: Paul D'Ambra <[email protected]>
  • Loading branch information
eoghanmurray and pauldambra authored Sep 5, 2025
commit 0b0d66293d3a17f8a257e6c57f2836b6ac20523b
2 changes: 1 addition & 1 deletion packages/rrweb/src/record/mutation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
const addedIds = new Set<number>();

while (this.mapRemoves.length) {
this.mirror.removeNodeFromMap(this.mapRemoves.shift()!);

Check warning on line 176 in packages/rrweb/src/record/mutation.ts

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/rrweb/src/record/mutation.ts#L176

[@typescript-eslint/no-non-null-assertion] Forbidden non-null assertion.
}

for (const n of this.movedSet) {
Expand Down Expand Up @@ -206,7 +206,7 @@
while (true) {
parentNode = dom.parentNode(n);
if (this.addedSet.has(parentNode as Node)) {
// start at top of added tree so as not to serialize children before their parents (parentId requirement)
// keep searching for the top of added tree so as not to serialize children before their parents (parentId requirement)
n = parentNode as Node;
continue;
}
Expand Down Expand Up @@ -333,7 +333,7 @@
if (hasShadowRoot(n as Node)) {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
this.shadowDomManager.addShadowRoot(
dom.shadowRoot(n as Node)!,

Check warning on line 336 in packages/rrweb/src/record/mutation.ts

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/rrweb/src/record/mutation.ts#L336

[@typescript-eslint/no-non-null-assertion] Forbidden non-null assertion.
this.doc,
);
}
Expand Down
Loading