@screeb/rrweb 1.0.9 → 1.0.11
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 +20 -4
- package/dist/rrweb.cjs.map +1 -1
- package/dist/rrweb.js +20 -4
- package/dist/rrweb.js.map +1 -1
- package/dist/rrweb.umd.cjs +20 -4
- package/dist/rrweb.umd.cjs.map +2 -2
- package/dist/rrweb.umd.min.cjs +12 -12
- package/dist/rrweb.umd.min.cjs.map +3 -3
- package/package.json +1 -1
package/dist/rrweb.umd.cjs
CHANGED
|
@@ -14802,11 +14802,19 @@ function createPlayerService(context, { getCastFn, applyEventsSynchronously, emi
|
|
|
14802
14802
|
emitter.emit(ReplayerEvents.PlayBack);
|
|
14803
14803
|
}
|
|
14804
14804
|
const syncEvents = new Array();
|
|
14805
|
+
let renderedFullSnapshot = false;
|
|
14805
14806
|
for (const event of neededEvents) {
|
|
14807
|
+
const isFullSnapshot = event.type === EventType.FullSnapshot;
|
|
14806
14808
|
if (lastPlayedTimestamp && lastPlayedTimestamp < baselineTime && (event.timestamp <= lastPlayedTimestamp || event === lastPlayedEvent)) {
|
|
14809
|
+
if (isFullSnapshot) {
|
|
14810
|
+
renderedFullSnapshot = true;
|
|
14811
|
+
}
|
|
14807
14812
|
continue;
|
|
14808
14813
|
}
|
|
14809
|
-
if (event.timestamp
|
|
14814
|
+
if (event.timestamp <= baselineTime || isFullSnapshot && !renderedFullSnapshot) {
|
|
14815
|
+
if (isFullSnapshot) {
|
|
14816
|
+
renderedFullSnapshot = true;
|
|
14817
|
+
}
|
|
14810
14818
|
syncEvents.push(event);
|
|
14811
14819
|
} else {
|
|
14812
14820
|
const castFn = getCastFn(event, false);
|
|
@@ -16503,7 +16511,7 @@ class Replayer {
|
|
|
16503
16511
|
return false;
|
|
16504
16512
|
};
|
|
16505
16513
|
const appendNode = (mutation) => {
|
|
16506
|
-
var _a2, _b;
|
|
16514
|
+
var _a2, _b, _c;
|
|
16507
16515
|
if (!this.iframe.contentDocument) {
|
|
16508
16516
|
return this.warn("Looks like your replayer has been destroyed.");
|
|
16509
16517
|
}
|
|
@@ -16516,6 +16524,14 @@ class Replayer {
|
|
|
16516
16524
|
}
|
|
16517
16525
|
return queue.push(mutation);
|
|
16518
16526
|
}
|
|
16527
|
+
if (mutation.node.type === NodeType.Document && ((_a2 = parent == null ? void 0 : parent.nodeName) == null ? void 0 : _a2.toLowerCase()) !== "iframe") {
|
|
16528
|
+
console.warn(
|
|
16529
|
+
"[Replayer] Skipping invalid document append to a non-iframe parent.",
|
|
16530
|
+
mutation,
|
|
16531
|
+
parent
|
|
16532
|
+
);
|
|
16533
|
+
return;
|
|
16534
|
+
}
|
|
16519
16535
|
if (mutation.node.isShadow) {
|
|
16520
16536
|
if (!hasShadowRoot(parent)) {
|
|
16521
16537
|
parent.attachShadow({ mode: "open" });
|
|
@@ -16591,7 +16607,7 @@ class Replayer {
|
|
|
16591
16607
|
}
|
|
16592
16608
|
} else if ((parentSn == null ? void 0 : parentSn.type) === NodeType.Document) {
|
|
16593
16609
|
const parentDoc = parent;
|
|
16594
|
-
if (mutation.node.type === NodeType.DocumentType && ((
|
|
16610
|
+
if (mutation.node.type === NodeType.DocumentType && ((_b = parentDoc.childNodes[0]) == null ? void 0 : _b.nodeType) === Node.DOCUMENT_TYPE_NODE)
|
|
16595
16611
|
parentDoc.removeChild(parentDoc.childNodes[0]);
|
|
16596
16612
|
if (target.nodeName === "HTML" && parentDoc.documentElement)
|
|
16597
16613
|
parentDoc.removeChild(
|
|
@@ -16609,7 +16625,7 @@ class Replayer {
|
|
|
16609
16625
|
parent.appendChild(target);
|
|
16610
16626
|
}
|
|
16611
16627
|
afterAppend(target, mutation.node.id);
|
|
16612
|
-
if (this.usingVirtualDom && target.nodeName === "#text" && parent.nodeName === "STYLE" && ((
|
|
16628
|
+
if (this.usingVirtualDom && target.nodeName === "#text" && parent.nodeName === "STYLE" && ((_c = parent.rules) == null ? void 0 : _c.length) > 0)
|
|
16613
16629
|
parent.rules = [];
|
|
16614
16630
|
if (isSerializedIframe(target, this.mirror)) {
|
|
16615
16631
|
const targetId = this.mirror.getId(target);
|