@posthog/rrweb 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.js CHANGED
@@ -13340,6 +13340,9 @@ class IframeManager {
13340
13340
  addLoadListener(cb) {
13341
13341
  this.loadListener = cb;
13342
13342
  }
13343
+ removeLoadListener() {
13344
+ this.loadListener = void 0;
13345
+ }
13343
13346
  attachIframe(iframeEl, childSn) {
13344
13347
  var _a2;
13345
13348
  this.mutationCb({
@@ -14742,13 +14745,14 @@ function record(options = {}) {
14742
14745
  hooks
14743
14746
  );
14744
14747
  };
14745
- iframeManager.addLoadListener((iframeEl) => {
14748
+ const loadListener = (iframeEl) => {
14746
14749
  try {
14747
14750
  handlers.push(observe(iframeEl.contentDocument));
14748
14751
  } catch (error) {
14749
14752
  console.warn(error);
14750
14753
  }
14751
- });
14754
+ };
14755
+ iframeManager.addLoadListener(loadListener);
14752
14756
  const init = () => {
14753
14757
  takeFullSnapshot$1();
14754
14758
  handlers.push(observe(document));
@@ -14783,6 +14787,7 @@ function record(options = {}) {
14783
14787
  return () => {
14784
14788
  handlers.forEach((h) => h());
14785
14789
  processedNodeManager.destroy();
14790
+ iframeManager.removeLoadListener();
14786
14791
  iframeManager.destroy();
14787
14792
  recording = false;
14788
14793
  unregisterErrorHandler();