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