@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.
@@ -11464,6 +11464,9 @@ class IframeManager {
11464
11464
  addLoadListener(cb) {
11465
11465
  this.loadListener = cb;
11466
11466
  }
11467
+ removeLoadListener() {
11468
+ this.loadListener = void 0;
11469
+ }
11467
11470
  attachIframe(iframeEl, childSn) {
11468
11471
  var _a2;
11469
11472
  this.mutationCb({
@@ -12846,13 +12849,14 @@ function record(options = {}) {
12846
12849
  hooks
12847
12850
  );
12848
12851
  };
12849
- iframeManager.addLoadListener((iframeEl) => {
12852
+ const loadListener = (iframeEl) => {
12850
12853
  try {
12851
12854
  handlers.push(observe(iframeEl.contentDocument));
12852
12855
  } catch (error) {
12853
12856
  console.warn(error);
12854
12857
  }
12855
- });
12858
+ };
12859
+ iframeManager.addLoadListener(loadListener);
12856
12860
  const init = () => {
12857
12861
  takeFullSnapshot$1();
12858
12862
  handlers.push(observe(document));
@@ -12887,6 +12891,7 @@ function record(options = {}) {
12887
12891
  return () => {
12888
12892
  handlers.forEach((h) => h());
12889
12893
  processedNodeManager.destroy();
12894
+ iframeManager.removeLoadListener();
12890
12895
  iframeManager.destroy();
12891
12896
  recording = false;
12892
12897
  unregisterErrorHandler();