@posthog/rrweb-snapshot 0.0.32 → 0.0.34

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.
@@ -983,6 +983,7 @@ var require_record = __commonJS({
983
983
  return n.href;
984
984
  }
985
985
  function serializeElementNode(n, options) {
986
+ var _a, _b;
986
987
  const {
987
988
  doc,
988
989
  blockClass,
@@ -1156,11 +1157,13 @@ var require_record = __commonJS({
1156
1157
  }
1157
1158
  }
1158
1159
  if (needBlock) {
1159
- const { width, height } = n.getBoundingClientRect();
1160
+ const { width, height, left, top } = n.getBoundingClientRect();
1160
1161
  attributes = {
1161
1162
  class: attributes.class,
1162
1163
  rr_width: `${width}px`,
1163
- rr_height: `${height}px`
1164
+ rr_height: `${height}px`,
1165
+ rr_left: `${Math.floor(left + (((_a = doc.defaultView) == null ? void 0 : _a.scrollX) || 0))}px`,
1166
+ rr_top: `${Math.floor(top + (((_b = doc.defaultView) == null ? void 0 : _b.scrollY) || 0))}px`
1164
1167
  };
1165
1168
  }
1166
1169
  if (tagName === "iframe" && !keepIframeSrcFn(attributes.src)) {
@@ -5714,6 +5717,12 @@ var require_replay = __commonJS({
5714
5717
  node2.style.setProperty("width", value.toString());
5715
5718
  } else if (name === "rr_height") {
5716
5719
  node2.style.setProperty("height", value.toString());
5720
+ } else if (name === "rr_left") {
5721
+ node2.style.setProperty("left", value.toString());
5722
+ node2.style.setProperty("position", "absolute");
5723
+ } else if (name === "rr_top") {
5724
+ node2.style.setProperty("top", value.toString());
5725
+ node2.style.setProperty("position", "absolute");
5717
5726
  } else if (name === "rr_mediaCurrentTime" && typeof value === "number") {
5718
5727
  node2.currentTime = value;
5719
5728
  } else if (name === "rr_mediaState") {