@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.cjs
CHANGED
|
@@ -13687,14 +13687,22 @@ class IframeManager {
|
|
|
13687
13687
|
}
|
|
13688
13688
|
removeIframeById(iframeId) {
|
|
13689
13689
|
const entry = this.attachedIframes.get(iframeId);
|
|
13690
|
-
|
|
13691
|
-
|
|
13692
|
-
|
|
13693
|
-
|
|
13694
|
-
|
|
13695
|
-
|
|
13690
|
+
const iframe = (entry == null ? void 0 : entry.element) || this.mirror.getNode(iframeId);
|
|
13691
|
+
if (iframe) {
|
|
13692
|
+
const win = iframe.contentWindow;
|
|
13693
|
+
if (win && this.nestedIframeListeners.has(win)) {
|
|
13694
|
+
const handler = this.nestedIframeListeners.get(win);
|
|
13695
|
+
win.removeEventListener("message", handler);
|
|
13696
|
+
this.nestedIframeListeners.delete(win);
|
|
13697
|
+
}
|
|
13698
|
+
if (win) {
|
|
13699
|
+
this.crossOriginIframeMap.delete(win);
|
|
13700
|
+
}
|
|
13701
|
+
this.iframes.delete(iframe);
|
|
13702
|
+
}
|
|
13703
|
+
if (entry) {
|
|
13704
|
+
this.attachedIframes.delete(iframeId);
|
|
13696
13705
|
}
|
|
13697
|
-
this.attachedIframes.delete(iframeId);
|
|
13698
13706
|
}
|
|
13699
13707
|
reattachIframes() {
|
|
13700
13708
|
this.attachedIframes.forEach(({ content }, iframeId) => {
|
|
@@ -14683,9 +14691,12 @@ function record(options = {}) {
|
|
|
14683
14691
|
}
|
|
14684
14692
|
};
|
|
14685
14693
|
const wrappedMutationEmit = (m) => {
|
|
14686
|
-
if (recordCrossOriginIframes && m.removes) {
|
|
14694
|
+
if (recordCrossOriginIframes && m.removes && m.removes.length > 0) {
|
|
14695
|
+
const addedIds = m.adds.length > 0 ? new Set(m.adds.map((add) => add.node.id)) : null;
|
|
14687
14696
|
m.removes.forEach(({ id }) => {
|
|
14688
|
-
|
|
14697
|
+
if (!addedIds || !addedIds.has(id)) {
|
|
14698
|
+
iframeManager.removeIframeById(id);
|
|
14699
|
+
}
|
|
14689
14700
|
});
|
|
14690
14701
|
}
|
|
14691
14702
|
wrappedEmit({
|