@posthog/rrweb 0.0.21 → 0.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/rrweb.cjs +7 -17
- package/dist/rrweb.cjs.map +1 -1
- package/dist/rrweb.js +7 -17
- package/dist/rrweb.js.map +1 -1
- package/dist/rrweb.umd.cjs +7 -17
- package/dist/rrweb.umd.cjs.map +2 -2
- package/dist/rrweb.umd.min.cjs +33 -33
- package/dist/rrweb.umd.min.cjs.map +3 -3
- package/package.json +1 -1
package/dist/rrweb.js
CHANGED
|
@@ -16185,7 +16185,7 @@ class Replayer {
|
|
|
16185
16185
|
this.virtualDom.mirror
|
|
16186
16186
|
);
|
|
16187
16187
|
} catch (e2) {
|
|
16188
|
-
|
|
16188
|
+
this.warn(e2);
|
|
16189
16189
|
}
|
|
16190
16190
|
this.virtualDom.destroyTree();
|
|
16191
16191
|
this.usingVirtualDom = false;
|
|
@@ -17073,16 +17073,6 @@ class Replayer {
|
|
|
17073
17073
|
...this.legacy_missingNodeRetryMap
|
|
17074
17074
|
};
|
|
17075
17075
|
const queue = [];
|
|
17076
|
-
const nextNotInDOM = (mutation) => {
|
|
17077
|
-
let next = null;
|
|
17078
|
-
if (mutation.nextId) {
|
|
17079
|
-
next = mirror2.getNode(mutation.nextId);
|
|
17080
|
-
}
|
|
17081
|
-
if (mutation.nextId !== null && mutation.nextId !== void 0 && mutation.nextId !== -1 && !next) {
|
|
17082
|
-
return true;
|
|
17083
|
-
}
|
|
17084
|
-
return false;
|
|
17085
|
-
};
|
|
17086
17076
|
const appendNode = (mutation) => {
|
|
17087
17077
|
var _a2, _b;
|
|
17088
17078
|
if (!this.iframe.contentDocument) {
|
|
@@ -17095,7 +17085,10 @@ class Replayer {
|
|
|
17095
17085
|
if (mutation.node.type === NodeType.Document) {
|
|
17096
17086
|
return this.newDocumentQueue.push(mutation);
|
|
17097
17087
|
}
|
|
17098
|
-
|
|
17088
|
+
const parentIdInCurrentBatch = d.adds.some(
|
|
17089
|
+
(add) => add.node.id === mutation.parentId
|
|
17090
|
+
);
|
|
17091
|
+
return parentIdInCurrentBatch ? queue.push(mutation) : void 0;
|
|
17099
17092
|
}
|
|
17100
17093
|
if (mutation.node.isShadow) {
|
|
17101
17094
|
if (!hasShadowRoot(parent)) {
|
|
@@ -17111,9 +17104,6 @@ class Replayer {
|
|
|
17111
17104
|
if (mutation.nextId) {
|
|
17112
17105
|
next = mirror2.getNode(mutation.nextId);
|
|
17113
17106
|
}
|
|
17114
|
-
if (nextNotInDOM(mutation)) {
|
|
17115
|
-
return queue.push(mutation);
|
|
17116
|
-
}
|
|
17117
17107
|
if (mutation.node.rootId && !mirror2.getNode(mutation.node.rootId)) {
|
|
17118
17108
|
return;
|
|
17119
17109
|
}
|
|
@@ -17219,11 +17209,11 @@ class Replayer {
|
|
|
17219
17209
|
d.adds.forEach((mutation) => {
|
|
17220
17210
|
appendNode(mutation);
|
|
17221
17211
|
});
|
|
17222
|
-
const startTime =
|
|
17212
|
+
const startTime = performance.now();
|
|
17223
17213
|
while (queue.length) {
|
|
17224
17214
|
const resolveTrees = queueToResolveTrees(queue);
|
|
17225
17215
|
queue.length = 0;
|
|
17226
|
-
if (
|
|
17216
|
+
if (performance.now() - startTime > 150) {
|
|
17227
17217
|
this.warn(
|
|
17228
17218
|
"Timeout in the loop, please check the resolve tree data:",
|
|
17229
17219
|
resolveTrees
|