@posthog/rrweb 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.cjs +9 -18
- package/dist/rrweb.cjs.map +1 -1
- package/dist/rrweb.js +9 -18
- package/dist/rrweb.js.map +1 -1
- package/dist/rrweb.umd.cjs +9 -18
- 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
|
@@ -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
|
|
@@ -17476,12 +17466,13 @@ class Replayer {
|
|
|
17476
17466
|
}
|
|
17477
17467
|
}
|
|
17478
17468
|
applyStyleDeclaration(data, styleSheet) {
|
|
17469
|
+
var _a2, _b;
|
|
17479
17470
|
if (data.set) {
|
|
17480
17471
|
const rule2 = getNestedRule(
|
|
17481
17472
|
styleSheet.rules,
|
|
17482
17473
|
data.index
|
|
17483
17474
|
);
|
|
17484
|
-
rule2.style.setProperty(
|
|
17475
|
+
(_a2 = rule2 == null ? void 0 : rule2.style) == null ? void 0 : _a2.setProperty(
|
|
17485
17476
|
data.set.property,
|
|
17486
17477
|
data.set.value,
|
|
17487
17478
|
data.set.priority
|
|
@@ -17492,7 +17483,7 @@ class Replayer {
|
|
|
17492
17483
|
styleSheet.rules,
|
|
17493
17484
|
data.index
|
|
17494
17485
|
);
|
|
17495
|
-
rule2.style.removeProperty(data.remove.property);
|
|
17486
|
+
(_b = rule2 == null ? void 0 : rule2.style) == null ? void 0 : _b.removeProperty(data.remove.property);
|
|
17496
17487
|
}
|
|
17497
17488
|
}
|
|
17498
17489
|
applyAdoptedStyleSheet(data) {
|