@glimt/record 0.0.77 → 0.0.78

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/record.cjs CHANGED
@@ -10377,8 +10377,10 @@ const _ObserveManager = class _ObserveManager2 {
10377
10377
  }
10378
10378
  onDocObserver(doc) {
10379
10379
  if (!this.usable) return false;
10380
- if (!this.docsObservers.has(doc)) return true;
10381
- this.docsObservers.add(doc);
10380
+ if (!this.docsObservers.has(doc)) {
10381
+ this.docsObservers.add(doc);
10382
+ return true;
10383
+ }
10382
10384
  debugLog(
10383
10385
  "onDocObserver: doc already observed, emitting full snapshot for doc",
10384
10386
  doc
@@ -10388,8 +10390,10 @@ const _ObserveManager = class _ObserveManager2 {
10388
10390
  }
10389
10391
  onShadowRootObserver(shadowRoot2) {
10390
10392
  if (!this.usable) return false;
10391
- if (!this.shadowRootsObservers.has(shadowRoot2)) return true;
10392
- this.shadowRootsObservers.add(shadowRoot2);
10393
+ if (!this.shadowRootsObservers.has(shadowRoot2)) {
10394
+ this.shadowRootsObservers.add(shadowRoot2);
10395
+ return true;
10396
+ }
10393
10397
  debugLog(
10394
10398
  "onShadowRootObserver: shadowRoot already observed, emitting full snapshot for shadowRoot",
10395
10399
  shadowRoot2
@@ -13603,6 +13607,7 @@ function record(options = {}) {
13603
13607
  iframeManager.addLoadListener((iframeEl) => {
13604
13608
  try {
13605
13609
  if (!observeManager.onDocObserver(iframeEl.contentDocument)) return;
13610
+ debugLog("Adding mutation observer for iframe", iframeEl);
13606
13611
  handlers.push(observe(iframeEl.contentDocument));
13607
13612
  } catch (error) {
13608
13613
  if (isDebug()) {