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