@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.
package/dist/record.cjs CHANGED
@@ -10292,7 +10292,7 @@ class IframeManager {
10292
10292
  const _ObserveManager = class _ObserveManager2 {
10293
10293
  constructor() {
10294
10294
  __publicField(this, "docsObservers", /* @__PURE__ */ new WeakSet());
10295
- __publicField(this, "shadowRootsObservers", /* @__PURE__ */ new WeakMap());
10295
+ __publicField(this, "shadowRootsObservers", /* @__PURE__ */ new WeakSet());
10296
10296
  __publicField(this, "mutationOptions");
10297
10297
  __publicField(this, "emitter", null);
10298
10298
  if (_ObserveManager2.instance) {
@@ -10377,7 +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;
10380
+ if (!this.docsObservers.has(doc)) {
10381
+ this.docsObservers.add(doc);
10382
+ return true;
10383
+ }
10381
10384
  debugLog(
10382
10385
  "onDocObserver: doc already observed, emitting full snapshot for doc",
10383
10386
  doc
@@ -10387,7 +10390,10 @@ const _ObserveManager = class _ObserveManager2 {
10387
10390
  }
10388
10391
  onShadowRootObserver(shadowRoot2) {
10389
10392
  if (!this.usable) return false;
10390
- if (!this.shadowRootsObservers.has(shadowRoot2)) return true;
10393
+ if (!this.shadowRootsObservers.has(shadowRoot2)) {
10394
+ this.shadowRootsObservers.add(shadowRoot2);
10395
+ return true;
10396
+ }
10391
10397
  debugLog(
10392
10398
  "onShadowRootObserver: shadowRoot already observed, emitting full snapshot for shadowRoot",
10393
10399
  shadowRoot2
@@ -10427,7 +10433,7 @@ const _ObserveManager = class _ObserveManager2 {
10427
10433
  // }
10428
10434
  destroy() {
10429
10435
  this.docsObservers = /* @__PURE__ */ new WeakSet();
10430
- this.shadowRootsObservers = /* @__PURE__ */ new WeakMap();
10436
+ this.shadowRootsObservers = /* @__PURE__ */ new WeakSet();
10431
10437
  }
10432
10438
  };
10433
10439
  __publicField(_ObserveManager, "instance");
@@ -13601,6 +13607,7 @@ function record(options = {}) {
13601
13607
  iframeManager.addLoadListener((iframeEl) => {
13602
13608
  try {
13603
13609
  if (!observeManager.onDocObserver(iframeEl.contentDocument)) return;
13610
+ debugLog("Adding mutation observer for iframe", iframeEl);
13604
13611
  handlers.push(observe(iframeEl.contentDocument));
13605
13612
  } catch (error) {
13606
13613
  if (isDebug()) {