@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.umd.cjs
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;
|
|
@@ -17071,16 +17071,6 @@ class Replayer {
|
|
|
17071
17071
|
});
|
|
17072
17072
|
const legacy_missingNodeMap = __spreadValues({}, this.legacy_missingNodeRetryMap);
|
|
17073
17073
|
const queue = [];
|
|
17074
|
-
const nextNotInDOM = (mutation) => {
|
|
17075
|
-
let next = null;
|
|
17076
|
-
if (mutation.nextId) {
|
|
17077
|
-
next = mirror2.getNode(mutation.nextId);
|
|
17078
|
-
}
|
|
17079
|
-
if (mutation.nextId !== null && mutation.nextId !== void 0 && mutation.nextId !== -1 && !next) {
|
|
17080
|
-
return true;
|
|
17081
|
-
}
|
|
17082
|
-
return false;
|
|
17083
|
-
};
|
|
17084
17074
|
const appendNode = (mutation) => {
|
|
17085
17075
|
var _a2, _b;
|
|
17086
17076
|
if (!this.iframe.contentDocument) {
|
|
@@ -17093,7 +17083,10 @@ class Replayer {
|
|
|
17093
17083
|
if (mutation.node.type === NodeType.Document) {
|
|
17094
17084
|
return this.newDocumentQueue.push(mutation);
|
|
17095
17085
|
}
|
|
17096
|
-
|
|
17086
|
+
const parentIdInCurrentBatch = d.adds.some(
|
|
17087
|
+
(add) => add.node.id === mutation.parentId
|
|
17088
|
+
);
|
|
17089
|
+
return parentIdInCurrentBatch ? queue.push(mutation) : void 0;
|
|
17097
17090
|
}
|
|
17098
17091
|
if (mutation.node.isShadow) {
|
|
17099
17092
|
if (!hasShadowRoot(parent)) {
|
|
@@ -17109,9 +17102,6 @@ class Replayer {
|
|
|
17109
17102
|
if (mutation.nextId) {
|
|
17110
17103
|
next = mirror2.getNode(mutation.nextId);
|
|
17111
17104
|
}
|
|
17112
|
-
if (nextNotInDOM(mutation)) {
|
|
17113
|
-
return queue.push(mutation);
|
|
17114
|
-
}
|
|
17115
17105
|
if (mutation.node.rootId && !mirror2.getNode(mutation.node.rootId)) {
|
|
17116
17106
|
return;
|
|
17117
17107
|
}
|
|
@@ -17217,11 +17207,11 @@ class Replayer {
|
|
|
17217
17207
|
d.adds.forEach((mutation) => {
|
|
17218
17208
|
appendNode(mutation);
|
|
17219
17209
|
});
|
|
17220
|
-
const startTime =
|
|
17210
|
+
const startTime = performance.now();
|
|
17221
17211
|
while (queue.length) {
|
|
17222
17212
|
const resolveTrees = queueToResolveTrees(queue);
|
|
17223
17213
|
queue.length = 0;
|
|
17224
|
-
if (
|
|
17214
|
+
if (performance.now() - startTime > 150) {
|
|
17225
17215
|
this.warn(
|
|
17226
17216
|
"Timeout in the loop, please check the resolve tree data:",
|
|
17227
17217
|
resolveTrees
|