@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.
@@ -10418,8 +10418,10 @@ const _ObserveManager = class _ObserveManager2 {
10418
10418
  }
10419
10419
  onDocObserver(doc) {
10420
10420
  if (!this.usable) return false;
10421
- if (!this.docsObservers.has(doc)) return true;
10422
- this.docsObservers.add(doc);
10421
+ if (!this.docsObservers.has(doc)) {
10422
+ this.docsObservers.add(doc);
10423
+ return true;
10424
+ }
10423
10425
  debugLog(
10424
10426
  "onDocObserver: doc already observed, emitting full snapshot for doc",
10425
10427
  doc
@@ -10429,8 +10431,10 @@ const _ObserveManager = class _ObserveManager2 {
10429
10431
  }
10430
10432
  onShadowRootObserver(shadowRoot2) {
10431
10433
  if (!this.usable) return false;
10432
- if (!this.shadowRootsObservers.has(shadowRoot2)) return true;
10433
- this.shadowRootsObservers.add(shadowRoot2);
10434
+ if (!this.shadowRootsObservers.has(shadowRoot2)) {
10435
+ this.shadowRootsObservers.add(shadowRoot2);
10436
+ return true;
10437
+ }
10434
10438
  debugLog(
10435
10439
  "onShadowRootObserver: shadowRoot already observed, emitting full snapshot for shadowRoot",
10436
10440
  shadowRoot2
@@ -13627,6 +13631,7 @@ function record(options = {}) {
13627
13631
  iframeManager.addLoadListener((iframeEl) => {
13628
13632
  try {
13629
13633
  if (!observeManager.onDocObserver(iframeEl.contentDocument)) return;
13634
+ debugLog("Adding mutation observer for iframe", iframeEl);
13630
13635
  handlers.push(observe(iframeEl.contentDocument));
13631
13636
  } catch (error) {
13632
13637
  if (isDebug()) {