@posthog/rrweb-player 0.0.22 → 0.0.24
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 +9 -18
- package/dist/rrweb-player.cjs.map +1 -1
- package/dist/rrweb-player.js +9 -18
- package/dist/rrweb-player.js.map +1 -1
- package/dist/rrweb-player.umd.cjs +9 -18
- 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.cjs
CHANGED
|
@@ -12826,16 +12826,6 @@ class Replayer {
|
|
|
12826
12826
|
...this.legacy_missingNodeRetryMap
|
|
12827
12827
|
};
|
|
12828
12828
|
const queue = [];
|
|
12829
|
-
const nextNotInDOM = (mutation) => {
|
|
12830
|
-
let next = null;
|
|
12831
|
-
if (mutation.nextId) {
|
|
12832
|
-
next = mirror2.getNode(mutation.nextId);
|
|
12833
|
-
}
|
|
12834
|
-
if (mutation.nextId !== null && mutation.nextId !== void 0 && mutation.nextId !== -1 && !next) {
|
|
12835
|
-
return true;
|
|
12836
|
-
}
|
|
12837
|
-
return false;
|
|
12838
|
-
};
|
|
12839
12829
|
const appendNode = (mutation) => {
|
|
12840
12830
|
var _a2, _b2;
|
|
12841
12831
|
if (!this.iframe.contentDocument) {
|
|
@@ -12848,7 +12838,10 @@ class Replayer {
|
|
|
12848
12838
|
if (mutation.node.type === NodeType.Document) {
|
|
12849
12839
|
return this.newDocumentQueue.push(mutation);
|
|
12850
12840
|
}
|
|
12851
|
-
|
|
12841
|
+
const parentIdInCurrentBatch = d.adds.some(
|
|
12842
|
+
(add) => add.node.id === mutation.parentId
|
|
12843
|
+
);
|
|
12844
|
+
return parentIdInCurrentBatch ? queue.push(mutation) : void 0;
|
|
12852
12845
|
}
|
|
12853
12846
|
if (mutation.node.isShadow) {
|
|
12854
12847
|
if (!hasShadowRoot(parent)) {
|
|
@@ -12864,9 +12857,6 @@ class Replayer {
|
|
|
12864
12857
|
if (mutation.nextId) {
|
|
12865
12858
|
next = mirror2.getNode(mutation.nextId);
|
|
12866
12859
|
}
|
|
12867
|
-
if (nextNotInDOM(mutation)) {
|
|
12868
|
-
return queue.push(mutation);
|
|
12869
|
-
}
|
|
12870
12860
|
if (mutation.node.rootId && !mirror2.getNode(mutation.node.rootId)) {
|
|
12871
12861
|
return;
|
|
12872
12862
|
}
|
|
@@ -12972,11 +12962,11 @@ class Replayer {
|
|
|
12972
12962
|
d.adds.forEach((mutation) => {
|
|
12973
12963
|
appendNode(mutation);
|
|
12974
12964
|
});
|
|
12975
|
-
const startTime =
|
|
12965
|
+
const startTime = performance.now();
|
|
12976
12966
|
while (queue.length) {
|
|
12977
12967
|
const resolveTrees = queueToResolveTrees(queue);
|
|
12978
12968
|
queue.length = 0;
|
|
12979
|
-
if (
|
|
12969
|
+
if (performance.now() - startTime > 150) {
|
|
12980
12970
|
this.warn(
|
|
12981
12971
|
"Timeout in the loop, please check the resolve tree data:",
|
|
12982
12972
|
resolveTrees
|
|
@@ -13231,12 +13221,13 @@ class Replayer {
|
|
|
13231
13221
|
}
|
|
13232
13222
|
}
|
|
13233
13223
|
applyStyleDeclaration(data, styleSheet) {
|
|
13224
|
+
var _a2, _b2;
|
|
13234
13225
|
if (data.set) {
|
|
13235
13226
|
const rule2 = getNestedRule(
|
|
13236
13227
|
styleSheet.rules,
|
|
13237
13228
|
data.index
|
|
13238
13229
|
);
|
|
13239
|
-
rule2.style.setProperty(
|
|
13230
|
+
(_a2 = rule2 == null ? void 0 : rule2.style) == null ? void 0 : _a2.setProperty(
|
|
13240
13231
|
data.set.property,
|
|
13241
13232
|
data.set.value,
|
|
13242
13233
|
data.set.priority
|
|
@@ -13247,7 +13238,7 @@ class Replayer {
|
|
|
13247
13238
|
styleSheet.rules,
|
|
13248
13239
|
data.index
|
|
13249
13240
|
);
|
|
13250
|
-
rule2.style.removeProperty(data.remove.property);
|
|
13241
|
+
(_b2 = rule2 == null ? void 0 : rule2.style) == null ? void 0 : _b2.removeProperty(data.remove.property);
|
|
13251
13242
|
}
|
|
13252
13243
|
}
|
|
13253
13244
|
applyAdoptedStyleSheet(data) {
|