@posthog/rrweb-player 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-player.cjs +6 -16
- package/dist/rrweb-player.cjs.map +1 -1
- package/dist/rrweb-player.js +6 -16
- package/dist/rrweb-player.js.map +1 -1
- package/dist/rrweb-player.umd.cjs +6 -16
- package/dist/rrweb-player.umd.cjs.map +2 -2
- package/dist/rrweb-player.umd.min.cjs +38 -38
- package/dist/rrweb-player.umd.min.cjs.map +3 -3
- package/package.json +1 -1
|
@@ -12853,16 +12853,6 @@ class Replayer {
|
|
|
12853
12853
|
});
|
|
12854
12854
|
const legacy_missingNodeMap = __spreadValues({}, this.legacy_missingNodeRetryMap);
|
|
12855
12855
|
const queue = [];
|
|
12856
|
-
const nextNotInDOM = (mutation) => {
|
|
12857
|
-
let next = null;
|
|
12858
|
-
if (mutation.nextId) {
|
|
12859
|
-
next = mirror2.getNode(mutation.nextId);
|
|
12860
|
-
}
|
|
12861
|
-
if (mutation.nextId !== null && mutation.nextId !== void 0 && mutation.nextId !== -1 && !next) {
|
|
12862
|
-
return true;
|
|
12863
|
-
}
|
|
12864
|
-
return false;
|
|
12865
|
-
};
|
|
12866
12856
|
const appendNode = (mutation) => {
|
|
12867
12857
|
var _a2, _b2;
|
|
12868
12858
|
if (!this.iframe.contentDocument) {
|
|
@@ -12875,7 +12865,10 @@ class Replayer {
|
|
|
12875
12865
|
if (mutation.node.type === NodeType.Document) {
|
|
12876
12866
|
return this.newDocumentQueue.push(mutation);
|
|
12877
12867
|
}
|
|
12878
|
-
|
|
12868
|
+
const parentIdInCurrentBatch = d.adds.some(
|
|
12869
|
+
(add) => add.node.id === mutation.parentId
|
|
12870
|
+
);
|
|
12871
|
+
return parentIdInCurrentBatch ? queue.push(mutation) : void 0;
|
|
12879
12872
|
}
|
|
12880
12873
|
if (mutation.node.isShadow) {
|
|
12881
12874
|
if (!hasShadowRoot(parent)) {
|
|
@@ -12891,9 +12884,6 @@ class Replayer {
|
|
|
12891
12884
|
if (mutation.nextId) {
|
|
12892
12885
|
next = mirror2.getNode(mutation.nextId);
|
|
12893
12886
|
}
|
|
12894
|
-
if (nextNotInDOM(mutation)) {
|
|
12895
|
-
return queue.push(mutation);
|
|
12896
|
-
}
|
|
12897
12887
|
if (mutation.node.rootId && !mirror2.getNode(mutation.node.rootId)) {
|
|
12898
12888
|
return;
|
|
12899
12889
|
}
|
|
@@ -12999,11 +12989,11 @@ class Replayer {
|
|
|
12999
12989
|
d.adds.forEach((mutation) => {
|
|
13000
12990
|
appendNode(mutation);
|
|
13001
12991
|
});
|
|
13002
|
-
const startTime =
|
|
12992
|
+
const startTime = performance.now();
|
|
13003
12993
|
while (queue.length) {
|
|
13004
12994
|
const resolveTrees = queueToResolveTrees(queue);
|
|
13005
12995
|
queue.length = 0;
|
|
13006
|
-
if (
|
|
12996
|
+
if (performance.now() - startTime > 150) {
|
|
13007
12997
|
this.warn(
|
|
13008
12998
|
"Timeout in the loop, please check the resolve tree data:",
|
|
13009
12999
|
resolveTrees
|