@screeb/rrweb 1.0.20 → 1.0.21

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/rrweb.cjs CHANGED
@@ -5420,7 +5420,9 @@ function initStyleSheetObserver({ styleSheetRuleCb, mirror: mirror2, stylesheetM
5420
5420
  id,
5421
5421
  styleId,
5422
5422
  removes: [
5423
- { index: [...getNestedCSSRulePositions(win, thisArg), index] }
5423
+ {
5424
+ index: [...getNestedCSSRulePositions(win, thisArg), index]
5425
+ }
5424
5426
  ]
5425
5427
  });
5426
5428
  }
@@ -7504,13 +7506,17 @@ function record(options = {}) {
7504
7506
  init();
7505
7507
  } else {
7506
7508
  handlers.push(
7507
- on("DOMContentLoaded", () => {
7508
- wrappedEmit({
7509
- type: EventType.DomContentLoaded,
7510
- data: {}
7511
- });
7512
- if (recordAfter === "DOMContentLoaded") init();
7513
- }, win.document)
7509
+ on(
7510
+ "DOMContentLoaded",
7511
+ () => {
7512
+ wrappedEmit({
7513
+ type: EventType.DomContentLoaded,
7514
+ data: {}
7515
+ });
7516
+ if (recordAfter === "DOMContentLoaded") init();
7517
+ },
7518
+ win.document
7519
+ )
7514
7520
  );
7515
7521
  handlers.push(
7516
7522
  on(
@@ -8218,7 +8224,7 @@ function createPlayerService(context, { getCastFn, applyEventsSynchronously, emi
8218
8224
  }
8219
8225
  events.splice(insertionIndex, 0, event);
8220
8226
  }
8221
- const isSync = event.timestamp < baselineTime || !timer.isActive();
8227
+ const isSync = event.timestamp < baselineTime;
8222
8228
  const castFn = getCastFn(event, isSync);
8223
8229
  if (isSync) {
8224
8230
  castFn();
@@ -8715,9 +8721,7 @@ class Replayer {
8715
8721
  }
8716
8722
  });
8717
8723
  if (hasAnyTail) {
8718
- this.mouseTailAnimationFrame = requestAnimationFrame(
8719
- this.stepMouseTails
8720
- );
8724
+ this.mouseTailAnimationFrame = requestAnimationFrame(this.stepMouseTails);
8721
8725
  } else {
8722
8726
  this.mouseTailAnimationFrame = null;
8723
8727
  }
@@ -10249,9 +10253,7 @@ class Replayer {
10249
10253
  const now = typeof performance !== "undefined" ? performance.now() : Date.now();
10250
10254
  pointer.tailPositions.push({ x: position.x, y: position.y, t: now });
10251
10255
  if (this.mouseTailAnimationFrame === null) {
10252
- this.mouseTailAnimationFrame = requestAnimationFrame(
10253
- this.stepMouseTails
10254
- );
10256
+ this.mouseTailAnimationFrame = requestAnimationFrame(this.stepMouseTails);
10255
10257
  }
10256
10258
  }
10257
10259
  hoverElements(el) {