@screeb/rrweb 1.0.2 → 1.0.4

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
@@ -11590,6 +11590,7 @@ function initMoveObserver({
11590
11590
  function initMouseInteractionObserver({
11591
11591
  mouseInteractionCb,
11592
11592
  doc,
11593
+ win,
11593
11594
  mirror: mirror2,
11594
11595
  blockClass,
11595
11596
  blockSelector,
@@ -11661,7 +11662,7 @@ function initMouseInteractionObserver({
11661
11662
  ).forEach((eventKey) => {
11662
11663
  let eventName = toLowerCase(eventKey);
11663
11664
  const handler = getHandler(eventKey);
11664
- if (window.PointerEvent) {
11665
+ if (win.PointerEvent) {
11665
11666
  switch (MouseInteractions[eventKey]) {
11666
11667
  case MouseInteractions.MouseDown:
11667
11668
  case MouseInteractions.MouseUp:
@@ -11717,14 +11718,14 @@ function initScrollObserver({
11717
11718
  );
11718
11719
  return on("scroll", updatePosition, doc);
11719
11720
  }
11720
- function initViewportResizeObserver({ viewportResizeCb }, { win }) {
11721
+ function initViewportResizeObserver({ viewportResizeCb, win: _win }, { win }) {
11721
11722
  let lastH = -1;
11722
11723
  let lastW = -1;
11723
11724
  const updateDimension = callbackWrapper(
11724
11725
  throttle(
11725
11726
  callbackWrapper(() => {
11726
- const height = getWindowHeight(win);
11727
- const width = getWindowWidth(win);
11727
+ const height = getWindowHeight(_win);
11728
+ const width = getWindowWidth(_win);
11728
11729
  if (lastH !== height || lastW !== width) {
11729
11730
  viewportResizeCb({
11730
11731
  width: Number(width),
@@ -13992,7 +13993,7 @@ function record(options = {}) {
13992
13993
  });
13993
13994
  const init = () => {
13994
13995
  takeFullSnapshot$1();
13995
- handlers.push(observe(document));
13996
+ handlers.push(observe(win.document));
13996
13997
  recording = true;
13997
13998
  };
13998
13999
  if (win.document.readyState === "interactive" || win.document.readyState === "complete") {