@posthog/rrweb-player 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-player.cjs +7 -17
- package/dist/rrweb-player.cjs.map +1 -1
- package/dist/rrweb-player.js +7 -17
- package/dist/rrweb-player.js.map +1 -1
- package/dist/rrweb-player.umd.cjs +7 -17
- 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
package/dist/rrweb-player.js
CHANGED
|
@@ -11936,7 +11936,7 @@ class Replayer {
|
|
|
11936
11936
|
this.virtualDom.mirror
|
|
11937
11937
|
);
|
|
11938
11938
|
} catch (e2) {
|
|
11939
|
-
|
|
11939
|
+
this.warn(e2);
|
|
11940
11940
|
}
|
|
11941
11941
|
this.virtualDom.destroyTree();
|
|
11942
11942
|
this.usingVirtualDom = false;
|
|
@@ -12824,16 +12824,6 @@ class Replayer {
|
|
|
12824
12824
|
...this.legacy_missingNodeRetryMap
|
|
12825
12825
|
};
|
|
12826
12826
|
const queue = [];
|
|
12827
|
-
const nextNotInDOM = (mutation) => {
|
|
12828
|
-
let next = null;
|
|
12829
|
-
if (mutation.nextId) {
|
|
12830
|
-
next = mirror2.getNode(mutation.nextId);
|
|
12831
|
-
}
|
|
12832
|
-
if (mutation.nextId !== null && mutation.nextId !== void 0 && mutation.nextId !== -1 && !next) {
|
|
12833
|
-
return true;
|
|
12834
|
-
}
|
|
12835
|
-
return false;
|
|
12836
|
-
};
|
|
12837
12827
|
const appendNode = (mutation) => {
|
|
12838
12828
|
var _a2, _b2;
|
|
12839
12829
|
if (!this.iframe.contentDocument) {
|
|
@@ -12846,7 +12836,10 @@ class Replayer {
|
|
|
12846
12836
|
if (mutation.node.type === NodeType.Document) {
|
|
12847
12837
|
return this.newDocumentQueue.push(mutation);
|
|
12848
12838
|
}
|
|
12849
|
-
|
|
12839
|
+
const parentIdInCurrentBatch = d.adds.some(
|
|
12840
|
+
(add) => add.node.id === mutation.parentId
|
|
12841
|
+
);
|
|
12842
|
+
return parentIdInCurrentBatch ? queue.push(mutation) : void 0;
|
|
12850
12843
|
}
|
|
12851
12844
|
if (mutation.node.isShadow) {
|
|
12852
12845
|
if (!hasShadowRoot(parent)) {
|
|
@@ -12862,9 +12855,6 @@ class Replayer {
|
|
|
12862
12855
|
if (mutation.nextId) {
|
|
12863
12856
|
next = mirror2.getNode(mutation.nextId);
|
|
12864
12857
|
}
|
|
12865
|
-
if (nextNotInDOM(mutation)) {
|
|
12866
|
-
return queue.push(mutation);
|
|
12867
|
-
}
|
|
12868
12858
|
if (mutation.node.rootId && !mirror2.getNode(mutation.node.rootId)) {
|
|
12869
12859
|
return;
|
|
12870
12860
|
}
|
|
@@ -12970,11 +12960,11 @@ class Replayer {
|
|
|
12970
12960
|
d.adds.forEach((mutation) => {
|
|
12971
12961
|
appendNode(mutation);
|
|
12972
12962
|
});
|
|
12973
|
-
const startTime =
|
|
12963
|
+
const startTime = performance.now();
|
|
12974
12964
|
while (queue.length) {
|
|
12975
12965
|
const resolveTrees = queueToResolveTrees(queue);
|
|
12976
12966
|
queue.length = 0;
|
|
12977
|
-
if (
|
|
12967
|
+
if (performance.now() - startTime > 150) {
|
|
12978
12968
|
this.warn(
|
|
12979
12969
|
"Timeout in the loop, please check the resolve tree data:",
|
|
12980
12970
|
resolveTrees
|