@posthog/rrweb 0.0.36 → 0.0.37
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 -9
- package/dist/rrweb.cjs.map +1 -1
- package/dist/rrweb.js +20 -9
- package/dist/rrweb.js.map +1 -1
- package/dist/rrweb.umd.cjs +20 -9
- package/dist/rrweb.umd.cjs.map +2 -2
- package/dist/rrweb.umd.min.cjs +8 -8
- package/dist/rrweb.umd.min.cjs.map +2 -2
- package/package.json +5 -5
package/dist/rrweb.umd.cjs
CHANGED
|
@@ -13694,14 +13694,22 @@ class IframeManager {
|
|
|
13694
13694
|
}
|
|
13695
13695
|
removeIframeById(iframeId) {
|
|
13696
13696
|
const entry = this.attachedIframes.get(iframeId);
|
|
13697
|
-
|
|
13698
|
-
|
|
13699
|
-
|
|
13700
|
-
|
|
13701
|
-
|
|
13702
|
-
|
|
13697
|
+
const iframe = (entry == null ? void 0 : entry.element) || this.mirror.getNode(iframeId);
|
|
13698
|
+
if (iframe) {
|
|
13699
|
+
const win = iframe.contentWindow;
|
|
13700
|
+
if (win && this.nestedIframeListeners.has(win)) {
|
|
13701
|
+
const handler = this.nestedIframeListeners.get(win);
|
|
13702
|
+
win.removeEventListener("message", handler);
|
|
13703
|
+
this.nestedIframeListeners.delete(win);
|
|
13704
|
+
}
|
|
13705
|
+
if (win) {
|
|
13706
|
+
this.crossOriginIframeMap.delete(win);
|
|
13707
|
+
}
|
|
13708
|
+
this.iframes.delete(iframe);
|
|
13709
|
+
}
|
|
13710
|
+
if (entry) {
|
|
13711
|
+
this.attachedIframes.delete(iframeId);
|
|
13703
13712
|
}
|
|
13704
|
-
this.attachedIframes.delete(iframeId);
|
|
13705
13713
|
}
|
|
13706
13714
|
reattachIframes() {
|
|
13707
13715
|
this.attachedIframes.forEach(({ content }, iframeId) => {
|
|
@@ -14687,9 +14695,12 @@ function record(options = {}) {
|
|
|
14687
14695
|
}
|
|
14688
14696
|
};
|
|
14689
14697
|
const wrappedMutationEmit = (m) => {
|
|
14690
|
-
if (recordCrossOriginIframes && m.removes) {
|
|
14698
|
+
if (recordCrossOriginIframes && m.removes && m.removes.length > 0) {
|
|
14699
|
+
const addedIds = m.adds.length > 0 ? new Set(m.adds.map((add) => add.node.id)) : null;
|
|
14691
14700
|
m.removes.forEach(({ id }) => {
|
|
14692
|
-
|
|
14701
|
+
if (!addedIds || !addedIds.has(id)) {
|
|
14702
|
+
iframeManager.removeIframeById(id);
|
|
14703
|
+
}
|
|
14693
14704
|
});
|
|
14694
14705
|
}
|
|
14695
14706
|
wrappedEmit({
|