@posthog/rrweb-record 0.0.26 → 0.0.27
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-record.cjs +7 -2
- package/dist/rrweb-record.cjs.map +1 -1
- package/dist/rrweb-record.js +7 -2
- package/dist/rrweb-record.js.map +1 -1
- package/dist/rrweb-record.umd.cjs +7 -2
- package/dist/rrweb-record.umd.cjs.map +2 -2
- package/dist/rrweb-record.umd.min.cjs +17 -17
- package/dist/rrweb-record.umd.min.cjs.map +3 -3
- package/package.json +1 -1
package/dist/rrweb-record.cjs
CHANGED
|
@@ -11466,6 +11466,9 @@ class IframeManager {
|
|
|
11466
11466
|
addLoadListener(cb) {
|
|
11467
11467
|
this.loadListener = cb;
|
|
11468
11468
|
}
|
|
11469
|
+
removeLoadListener() {
|
|
11470
|
+
this.loadListener = void 0;
|
|
11471
|
+
}
|
|
11469
11472
|
attachIframe(iframeEl, childSn) {
|
|
11470
11473
|
var _a2;
|
|
11471
11474
|
this.mutationCb({
|
|
@@ -12848,13 +12851,14 @@ function record(options = {}) {
|
|
|
12848
12851
|
hooks
|
|
12849
12852
|
);
|
|
12850
12853
|
};
|
|
12851
|
-
|
|
12854
|
+
const loadListener = (iframeEl) => {
|
|
12852
12855
|
try {
|
|
12853
12856
|
handlers.push(observe(iframeEl.contentDocument));
|
|
12854
12857
|
} catch (error) {
|
|
12855
12858
|
console.warn(error);
|
|
12856
12859
|
}
|
|
12857
|
-
}
|
|
12860
|
+
};
|
|
12861
|
+
iframeManager.addLoadListener(loadListener);
|
|
12858
12862
|
const init = () => {
|
|
12859
12863
|
takeFullSnapshot$1();
|
|
12860
12864
|
handlers.push(observe(document));
|
|
@@ -12889,6 +12893,7 @@ function record(options = {}) {
|
|
|
12889
12893
|
return () => {
|
|
12890
12894
|
handlers.forEach((h) => h());
|
|
12891
12895
|
processedNodeManager.destroy();
|
|
12896
|
+
iframeManager.removeLoadListener();
|
|
12892
12897
|
iframeManager.destroy();
|
|
12893
12898
|
recording = false;
|
|
12894
12899
|
unregisterErrorHandler();
|