@glimt/record 0.0.76 → 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.
@@ -10334,7 +10334,7 @@ class IframeManager {
10334
10334
  const _ObserveManager = class _ObserveManager2 {
10335
10335
  constructor() {
10336
10336
  __publicField(this, "docsObservers", /* @__PURE__ */ new WeakSet());
10337
- __publicField(this, "shadowRootsObservers", /* @__PURE__ */ new WeakMap());
10337
+ __publicField(this, "shadowRootsObservers", /* @__PURE__ */ new WeakSet());
10338
10338
  __publicField(this, "mutationOptions");
10339
10339
  __publicField(this, "emitter", null);
10340
10340
  if (_ObserveManager2.instance) {
@@ -10418,7 +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;
10421
+ if (!this.docsObservers.has(doc)) {
10422
+ this.docsObservers.add(doc);
10423
+ return true;
10424
+ }
10422
10425
  debugLog(
10423
10426
  "onDocObserver: doc already observed, emitting full snapshot for doc",
10424
10427
  doc
@@ -10428,7 +10431,10 @@ const _ObserveManager = class _ObserveManager2 {
10428
10431
  }
10429
10432
  onShadowRootObserver(shadowRoot2) {
10430
10433
  if (!this.usable) return false;
10431
- if (!this.shadowRootsObservers.has(shadowRoot2)) return true;
10434
+ if (!this.shadowRootsObservers.has(shadowRoot2)) {
10435
+ this.shadowRootsObservers.add(shadowRoot2);
10436
+ return true;
10437
+ }
10432
10438
  debugLog(
10433
10439
  "onShadowRootObserver: shadowRoot already observed, emitting full snapshot for shadowRoot",
10434
10440
  shadowRoot2
@@ -10468,7 +10474,7 @@ const _ObserveManager = class _ObserveManager2 {
10468
10474
  // }
10469
10475
  destroy() {
10470
10476
  this.docsObservers = /* @__PURE__ */ new WeakSet();
10471
- this.shadowRootsObservers = /* @__PURE__ */ new WeakMap();
10477
+ this.shadowRootsObservers = /* @__PURE__ */ new WeakSet();
10472
10478
  }
10473
10479
  };
10474
10480
  __publicField(_ObserveManager, "instance");
@@ -13625,6 +13631,7 @@ function record(options = {}) {
13625
13631
  iframeManager.addLoadListener((iframeEl) => {
13626
13632
  try {
13627
13633
  if (!observeManager.onDocObserver(iframeEl.contentDocument)) return;
13634
+ debugLog("Adding mutation observer for iframe", iframeEl);
13628
13635
  handlers.push(observe(iframeEl.contentDocument));
13629
13636
  } catch (error) {
13630
13637
  if (isDebug()) {