@appsurify-testmap/rrweb 2.0.0-alpha.35 → 2.0.0-alpha.41
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 +127 -116
- package/dist/rrweb.cjs.map +1 -1
- package/dist/rrweb.d.cts +4 -3
- package/dist/rrweb.d.ts +4 -3
- package/dist/rrweb.js +127 -116
- package/dist/rrweb.js.map +1 -1
- package/dist/rrweb.umd.cjs +129 -116
- package/dist/rrweb.umd.cjs.map +3 -3
- package/dist/rrweb.umd.min.cjs +26 -26
- package/dist/rrweb.umd.min.cjs.map +3 -3
- package/package.json +5 -5
package/dist/rrweb.umd.cjs
CHANGED
|
@@ -572,7 +572,7 @@ function getXPath(node2) {
|
|
|
572
572
|
return "/html/body";
|
|
573
573
|
}
|
|
574
574
|
const parentNode2 = element.parentNode;
|
|
575
|
-
if (!parentNode2
|
|
575
|
+
if (!parentNode2) {
|
|
576
576
|
return "";
|
|
577
577
|
}
|
|
578
578
|
const siblings = Array.from(parentNode2.children).filter(
|
|
@@ -634,14 +634,21 @@ function isTextVisible(n2) {
|
|
|
634
634
|
return textContent2 !== "";
|
|
635
635
|
}
|
|
636
636
|
function isElementVisible(n2) {
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
const style =
|
|
641
|
-
|
|
637
|
+
var _a3;
|
|
638
|
+
var _a2;
|
|
639
|
+
const win = (_a3 = (_a2 = n2.ownerDocument) == null ? void 0 : _a2.defaultView) != null ? _a3 : null;
|
|
640
|
+
const style = win ? win.getComputedStyle(n2) : null;
|
|
641
|
+
const isStyleVisible = style != null && style.display !== "none" && style.visibility !== "hidden" && parseFloat(style.opacity) !== 0;
|
|
642
|
+
const rect = n2.getBoundingClientRect();
|
|
643
|
+
const result2 = isStyleVisible && isRectVisible(rect, win);
|
|
644
|
+
return result2;
|
|
642
645
|
}
|
|
643
|
-
function isRectVisible(rect) {
|
|
644
|
-
|
|
646
|
+
function isRectVisible(rect, win) {
|
|
647
|
+
var _a3, _b2, _c2, _d2;
|
|
648
|
+
var _a2, _b, _c, _d;
|
|
649
|
+
const height = (_b2 = (_a3 = win == null ? void 0 : win.innerHeight) != null ? _a3 : (_b = (_a2 = win == null ? void 0 : win.document) == null ? void 0 : _a2.documentElement) == null ? void 0 : _b.clientHeight) != null ? _b2 : 0;
|
|
650
|
+
const width = (_d2 = (_c2 = win == null ? void 0 : win.innerWidth) != null ? _c2 : (_d = (_c = win == null ? void 0 : win.document) == null ? void 0 : _c.documentElement) == null ? void 0 : _d.clientWidth) != null ? _d2 : 0;
|
|
651
|
+
return rect.width > 0 && rect.height > 0 && rect.top >= 0 && rect.left >= 0 && rect.bottom <= height && rect.right <= width;
|
|
645
652
|
}
|
|
646
653
|
const interactiveEvents$1 = [
|
|
647
654
|
"change",
|
|
@@ -681,7 +688,7 @@ const interactiveTags = [
|
|
|
681
688
|
"video",
|
|
682
689
|
"audio"
|
|
683
690
|
];
|
|
684
|
-
const inlineEventAttributes
|
|
691
|
+
const inlineEventAttributes = [
|
|
685
692
|
"onclick",
|
|
686
693
|
"ondblclick",
|
|
687
694
|
"onmousedown",
|
|
@@ -706,25 +713,31 @@ const inlineEventAttributes$1 = [
|
|
|
706
713
|
"ontouchcancel"
|
|
707
714
|
];
|
|
708
715
|
const interactiveElementsRegistry$1 = /* @__PURE__ */ new WeakSet();
|
|
709
|
-
|
|
710
|
-
EventTarget.prototype.addEventListener
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
+
if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
|
|
717
|
+
const originalAddEventListener = EventTarget.prototype.addEventListener;
|
|
718
|
+
EventTarget.prototype.addEventListener = function(type, listener, options) {
|
|
719
|
+
originalAddEventListener.call(this, type, listener, options);
|
|
720
|
+
if (this instanceof Element) {
|
|
721
|
+
const eventType = type.toLowerCase();
|
|
722
|
+
if (interactiveEvents$1.includes(eventType)) {
|
|
723
|
+
interactiveElementsRegistry$1.add(this);
|
|
724
|
+
}
|
|
716
725
|
}
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
|
|
720
|
-
EventTarget.prototype.removeEventListener
|
|
721
|
-
|
|
722
|
-
|
|
726
|
+
};
|
|
727
|
+
}
|
|
728
|
+
if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
|
|
729
|
+
const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
|
|
730
|
+
EventTarget.prototype.removeEventListener = function(type, listener, options) {
|
|
731
|
+
originalRemoveEventListener.call(this, type, listener, options);
|
|
732
|
+
if (this instanceof Element) {
|
|
733
|
+
type.toLowerCase();
|
|
734
|
+
}
|
|
735
|
+
};
|
|
736
|
+
}
|
|
723
737
|
function hasEventListeners(n2) {
|
|
724
738
|
return n2 instanceof Element && interactiveElementsRegistry$1.has(n2);
|
|
725
739
|
}
|
|
726
740
|
function isElementInteractive(n2) {
|
|
727
|
-
var _a2;
|
|
728
741
|
if (n2.nodeType === Node.ELEMENT_NODE) {
|
|
729
742
|
const element = n2;
|
|
730
743
|
const tagName = element.tagName.toLowerCase();
|
|
@@ -738,30 +751,35 @@ function isElementInteractive(n2) {
|
|
|
738
751
|
const result2 = hasEventListeners(element) || hasTabIndex || hasRoleInteractive || element instanceof HTMLAnchorElement && element.hasAttribute("href") || element instanceof HTMLButtonElement && !element.disabled;
|
|
739
752
|
return result2;
|
|
740
753
|
}
|
|
741
|
-
if (n2.nodeType === Node.TEXT_NODE) {
|
|
742
|
-
const textNode = n2;
|
|
743
|
-
const parentElement2 = textNode.parentElement;
|
|
744
|
-
if (parentElement2 !== null && interactiveTags.includes(parentElement2.tagName.toLowerCase())) {
|
|
745
|
-
return true;
|
|
746
|
-
}
|
|
747
|
-
return parentElement2 !== null && isElementVisible(parentElement2) && ((_a2 = textNode.textContent) == null ? void 0 : _a2.trim().length) !== 0 && isElementInteractive(parentElement2);
|
|
748
|
-
}
|
|
749
754
|
return false;
|
|
750
755
|
}
|
|
751
|
-
function inspectInlineEventHandlers
|
|
752
|
-
|
|
756
|
+
function inspectInlineEventHandlers(doc) {
|
|
757
|
+
if (!doc || typeof doc.querySelectorAll !== "function") return;
|
|
758
|
+
const allElements = doc.querySelectorAll("*");
|
|
753
759
|
allElements.forEach((el) => {
|
|
754
|
-
inlineEventAttributes
|
|
760
|
+
inlineEventAttributes.forEach((attr) => {
|
|
755
761
|
if (el.hasAttribute(attr)) {
|
|
756
762
|
interactiveElementsRegistry$1.add(el);
|
|
757
763
|
}
|
|
758
764
|
});
|
|
759
765
|
});
|
|
760
766
|
}
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
767
|
+
function scheduleInlineEventInspection(doc) {
|
|
768
|
+
if (!doc || typeof doc.addEventListener !== "function" || typeof doc.querySelectorAll !== "function") {
|
|
769
|
+
return;
|
|
770
|
+
}
|
|
771
|
+
try {
|
|
772
|
+
if (doc.readyState === "complete" || doc.readyState === "interactive") {
|
|
773
|
+
inspectInlineEventHandlers(doc);
|
|
774
|
+
} else {
|
|
775
|
+
doc.addEventListener("DOMContentLoaded", () => inspectInlineEventHandlers(doc), {
|
|
776
|
+
once: true,
|
|
777
|
+
capture: false
|
|
778
|
+
});
|
|
779
|
+
}
|
|
780
|
+
} catch (e2) {
|
|
781
|
+
console.warn("[inlineEventInspection] Failed to inspect document:", e2);
|
|
782
|
+
}
|
|
765
783
|
}
|
|
766
784
|
let _id = 1;
|
|
767
785
|
const tagNameRegex = new RegExp("[^a-z0-9-_:]");
|
|
@@ -880,9 +898,29 @@ function transformAttribute(doc, tagName, name, value) {
|
|
|
880
898
|
}
|
|
881
899
|
return value;
|
|
882
900
|
}
|
|
883
|
-
function
|
|
901
|
+
function isIgnoreAttribute(tagName, name, _value) {
|
|
884
902
|
return (tagName === "video" || tagName === "audio") && name === "autoplay";
|
|
885
903
|
}
|
|
904
|
+
function cleanAttributes(doc, element, ignoreAttribute) {
|
|
905
|
+
const tagName = getValidTagName$1(element);
|
|
906
|
+
const attributes = {};
|
|
907
|
+
const len = element.attributes.length;
|
|
908
|
+
for (let i2 = 0; i2 < len; i2++) {
|
|
909
|
+
const attr = element.attributes[i2];
|
|
910
|
+
const name = attr.name;
|
|
911
|
+
const value = attr.value;
|
|
912
|
+
const shouldIgnoreByName = typeof ignoreAttribute === "string" ? name === ignoreAttribute : ignoreAttribute.test(name);
|
|
913
|
+
if (!shouldIgnoreByName && !isIgnoreAttribute(tagName, name)) {
|
|
914
|
+
attributes[name] = transformAttribute(
|
|
915
|
+
doc,
|
|
916
|
+
tagName,
|
|
917
|
+
toLowerCase(name),
|
|
918
|
+
value
|
|
919
|
+
);
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
return attributes;
|
|
923
|
+
}
|
|
886
924
|
function _isBlockedElement(element, blockClass, blockSelector) {
|
|
887
925
|
try {
|
|
888
926
|
if (typeof blockClass === "string") {
|
|
@@ -1012,6 +1050,7 @@ function serializeNode(n2, options) {
|
|
|
1012
1050
|
mirror: mirror2,
|
|
1013
1051
|
blockClass,
|
|
1014
1052
|
blockSelector,
|
|
1053
|
+
ignoreAttribute,
|
|
1015
1054
|
needsMask,
|
|
1016
1055
|
inlineStylesheet,
|
|
1017
1056
|
maskInputOptions = {},
|
|
@@ -1056,6 +1095,7 @@ function serializeNode(n2, options) {
|
|
|
1056
1095
|
doc,
|
|
1057
1096
|
blockClass,
|
|
1058
1097
|
blockSelector,
|
|
1098
|
+
ignoreAttribute,
|
|
1059
1099
|
inlineStylesheet,
|
|
1060
1100
|
maskInputOptions,
|
|
1061
1101
|
maskInputFn,
|
|
@@ -1133,6 +1173,7 @@ function serializeElementNode(n2, options) {
|
|
|
1133
1173
|
doc,
|
|
1134
1174
|
blockClass,
|
|
1135
1175
|
blockSelector,
|
|
1176
|
+
ignoreAttribute,
|
|
1136
1177
|
inlineStylesheet,
|
|
1137
1178
|
maskInputOptions = {},
|
|
1138
1179
|
maskInputFn,
|
|
@@ -1146,19 +1187,7 @@ function serializeElementNode(n2, options) {
|
|
|
1146
1187
|
} = options;
|
|
1147
1188
|
const needBlock = _isBlockedElement(n2, blockClass, blockSelector);
|
|
1148
1189
|
const tagName = getValidTagName$1(n2);
|
|
1149
|
-
let attributes =
|
|
1150
|
-
const len = n2.attributes.length;
|
|
1151
|
-
for (let i2 = 0; i2 < len; i2++) {
|
|
1152
|
-
const attr = n2.attributes[i2];
|
|
1153
|
-
if (!ignoreAttribute(tagName, attr.name, attr.value)) {
|
|
1154
|
-
attributes[attr.name] = transformAttribute(
|
|
1155
|
-
doc,
|
|
1156
|
-
tagName,
|
|
1157
|
-
toLowerCase(attr.name),
|
|
1158
|
-
attr.value
|
|
1159
|
-
);
|
|
1160
|
-
}
|
|
1161
|
-
}
|
|
1190
|
+
let attributes = cleanAttributes(doc, n2, ignoreAttribute);
|
|
1162
1191
|
if (tagName === "link" && inlineStylesheet) {
|
|
1163
1192
|
const stylesheet = Array.from(doc.styleSheets).find((s2) => {
|
|
1164
1193
|
return s2.href === n2.href;
|
|
@@ -1372,6 +1401,7 @@ function serializeNodeWithId(n2, options) {
|
|
|
1372
1401
|
blockSelector,
|
|
1373
1402
|
maskTextClass,
|
|
1374
1403
|
maskTextSelector,
|
|
1404
|
+
ignoreAttribute,
|
|
1375
1405
|
skipChild = false,
|
|
1376
1406
|
inlineStylesheet = true,
|
|
1377
1407
|
maskInputOptions = {},
|
|
@@ -1406,6 +1436,7 @@ function serializeNodeWithId(n2, options) {
|
|
|
1406
1436
|
mirror: mirror2,
|
|
1407
1437
|
blockClass,
|
|
1408
1438
|
blockSelector,
|
|
1439
|
+
ignoreAttribute,
|
|
1409
1440
|
needsMask,
|
|
1410
1441
|
inlineStylesheet,
|
|
1411
1442
|
maskInputOptions,
|
|
@@ -1458,6 +1489,7 @@ function serializeNodeWithId(n2, options) {
|
|
|
1458
1489
|
needsMask,
|
|
1459
1490
|
maskTextClass,
|
|
1460
1491
|
maskTextSelector,
|
|
1492
|
+
ignoreAttribute,
|
|
1461
1493
|
skipChild,
|
|
1462
1494
|
inlineStylesheet,
|
|
1463
1495
|
maskInputOptions,
|
|
@@ -1517,6 +1549,7 @@ function serializeNodeWithId(n2, options) {
|
|
|
1517
1549
|
needsMask,
|
|
1518
1550
|
maskTextClass,
|
|
1519
1551
|
maskTextSelector,
|
|
1552
|
+
ignoreAttribute,
|
|
1520
1553
|
skipChild: false,
|
|
1521
1554
|
inlineStylesheet,
|
|
1522
1555
|
maskInputOptions,
|
|
@@ -1558,6 +1591,7 @@ function serializeNodeWithId(n2, options) {
|
|
|
1558
1591
|
needsMask,
|
|
1559
1592
|
maskTextClass,
|
|
1560
1593
|
maskTextSelector,
|
|
1594
|
+
ignoreAttribute,
|
|
1561
1595
|
skipChild: false,
|
|
1562
1596
|
inlineStylesheet,
|
|
1563
1597
|
maskInputOptions,
|
|
@@ -1595,6 +1629,7 @@ function snapshot(n2, options) {
|
|
|
1595
1629
|
blockSelector = null,
|
|
1596
1630
|
maskTextClass = "rr-mask",
|
|
1597
1631
|
maskTextSelector = null,
|
|
1632
|
+
ignoreAttribute = "rr-ignore-attr",
|
|
1598
1633
|
inlineStylesheet = true,
|
|
1599
1634
|
inlineImages = false,
|
|
1600
1635
|
recordCanvas = false,
|
|
@@ -1611,6 +1646,7 @@ function snapshot(n2, options) {
|
|
|
1611
1646
|
stylesheetLoadTimeout,
|
|
1612
1647
|
keepIframeSrcFn = () => false
|
|
1613
1648
|
} = options || {};
|
|
1649
|
+
scheduleInlineEventInspection(n2);
|
|
1614
1650
|
const maskInputOptions = maskAllInputs === true ? {
|
|
1615
1651
|
color: true,
|
|
1616
1652
|
date: true,
|
|
@@ -1654,6 +1690,7 @@ function snapshot(n2, options) {
|
|
|
1654
1690
|
blockSelector,
|
|
1655
1691
|
maskTextClass,
|
|
1656
1692
|
maskTextSelector,
|
|
1693
|
+
ignoreAttribute,
|
|
1657
1694
|
skipChild: false,
|
|
1658
1695
|
inlineStylesheet,
|
|
1659
1696
|
maskInputOptions,
|
|
@@ -5733,59 +5770,27 @@ const interactiveEvents = [
|
|
|
5733
5770
|
"touchend",
|
|
5734
5771
|
"touchcancel"
|
|
5735
5772
|
];
|
|
5736
|
-
const inlineEventAttributes = [
|
|
5737
|
-
"onclick",
|
|
5738
|
-
"ondblclick",
|
|
5739
|
-
"onmousedown",
|
|
5740
|
-
"onmouseup",
|
|
5741
|
-
"onmouseover",
|
|
5742
|
-
"onmouseout",
|
|
5743
|
-
"onmousemove",
|
|
5744
|
-
"onfocus",
|
|
5745
|
-
"onblur",
|
|
5746
|
-
"onkeydown",
|
|
5747
|
-
"onkeypress",
|
|
5748
|
-
"onkeyup",
|
|
5749
|
-
"onchange",
|
|
5750
|
-
"oninput",
|
|
5751
|
-
"onsubmit",
|
|
5752
|
-
"onreset",
|
|
5753
|
-
"onselect",
|
|
5754
|
-
"oncontextmenu",
|
|
5755
|
-
"ontouchstart",
|
|
5756
|
-
"ontouchmove",
|
|
5757
|
-
"ontouchend",
|
|
5758
|
-
"ontouchcancel"
|
|
5759
|
-
];
|
|
5760
5773
|
const interactiveElementsRegistry = /* @__PURE__ */ new WeakSet();
|
|
5761
|
-
|
|
5762
|
-
EventTarget.prototype.addEventListener
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
|
-
}
|
|
5770
|
-
};
|
|
5771
|
-
const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
|
|
5772
|
-
EventTarget.prototype.removeEventListener = function(type, listener, options) {
|
|
5773
|
-
originalRemoveEventListener.call(this, type, listener, options);
|
|
5774
|
-
};
|
|
5775
|
-
function inspectInlineEventHandlers() {
|
|
5776
|
-
const allElements = document.querySelectorAll("*");
|
|
5777
|
-
allElements.forEach((el) => {
|
|
5778
|
-
inlineEventAttributes.forEach((attr) => {
|
|
5779
|
-
if (el.hasAttribute(attr)) {
|
|
5780
|
-
interactiveElementsRegistry.add(el);
|
|
5774
|
+
if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
|
|
5775
|
+
const originalAddEventListener = EventTarget.prototype.addEventListener;
|
|
5776
|
+
EventTarget.prototype.addEventListener = function(type, listener, options) {
|
|
5777
|
+
originalAddEventListener.call(this, type, listener, options);
|
|
5778
|
+
if (this instanceof Element) {
|
|
5779
|
+
const eventType = type.toLowerCase();
|
|
5780
|
+
if (interactiveEvents.includes(eventType)) {
|
|
5781
|
+
interactiveElementsRegistry.add(this);
|
|
5781
5782
|
}
|
|
5782
|
-
}
|
|
5783
|
-
}
|
|
5783
|
+
}
|
|
5784
|
+
};
|
|
5784
5785
|
}
|
|
5785
|
-
if (
|
|
5786
|
-
|
|
5787
|
-
|
|
5788
|
-
|
|
5786
|
+
if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
|
|
5787
|
+
const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
|
|
5788
|
+
EventTarget.prototype.removeEventListener = function(type, listener, options) {
|
|
5789
|
+
originalRemoveEventListener.call(this, type, listener, options);
|
|
5790
|
+
if (this instanceof Element) {
|
|
5791
|
+
type.toLowerCase();
|
|
5792
|
+
}
|
|
5793
|
+
};
|
|
5789
5794
|
}
|
|
5790
5795
|
function getDefaultExportFromCjs(x2) {
|
|
5791
5796
|
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
|
|
@@ -10866,7 +10871,7 @@ let nowTimestamp = Date.now;
|
|
|
10866
10871
|
if (!/* @__PURE__ */ /[1-9][0-9]{12}/.test(Date.now().toString())) {
|
|
10867
10872
|
nowTimestamp = () => (/* @__PURE__ */ new Date()).getTime();
|
|
10868
10873
|
}
|
|
10869
|
-
function getWindowScroll(win) {
|
|
10874
|
+
function getWindowScroll(win = window) {
|
|
10870
10875
|
var _a2, _b, _c, _d;
|
|
10871
10876
|
const doc = win.document;
|
|
10872
10877
|
return {
|
|
@@ -10874,11 +10879,13 @@ function getWindowScroll(win) {
|
|
|
10874
10879
|
top: doc.scrollingElement ? doc.scrollingElement.scrollTop : win.pageYOffset !== void 0 ? win.pageYOffset : (doc == null ? void 0 : doc.documentElement.scrollTop) || (doc == null ? void 0 : doc.body) && ((_c = index.parentElement(doc.body)) == null ? void 0 : _c.scrollTop) || ((_d = doc == null ? void 0 : doc.body) == null ? void 0 : _d.scrollTop) || 0
|
|
10875
10880
|
};
|
|
10876
10881
|
}
|
|
10877
|
-
function getWindowHeight() {
|
|
10878
|
-
|
|
10882
|
+
function getWindowHeight(win = window) {
|
|
10883
|
+
const doc = win.document;
|
|
10884
|
+
return win.innerHeight || doc.documentElement && doc.documentElement.clientHeight || doc.body && doc.body.clientHeight || 0;
|
|
10879
10885
|
}
|
|
10880
|
-
function getWindowWidth() {
|
|
10881
|
-
|
|
10886
|
+
function getWindowWidth(win = window) {
|
|
10887
|
+
const doc = win.document;
|
|
10888
|
+
return win.innerWidth || doc.documentElement && doc.documentElement.clientWidth || doc.body && doc.body.clientWidth || 0;
|
|
10882
10889
|
}
|
|
10883
10890
|
function closestElementOfNode(node2) {
|
|
10884
10891
|
if (!node2) {
|
|
@@ -11348,6 +11355,7 @@ class MutationBuffer {
|
|
|
11348
11355
|
__publicField(this, "blockSelector");
|
|
11349
11356
|
__publicField(this, "maskTextClass");
|
|
11350
11357
|
__publicField(this, "maskTextSelector");
|
|
11358
|
+
__publicField(this, "ignoreAttribute");
|
|
11351
11359
|
__publicField(this, "inlineStylesheet");
|
|
11352
11360
|
__publicField(this, "maskInputOptions");
|
|
11353
11361
|
__publicField(this, "maskTextFn");
|
|
@@ -11411,6 +11419,7 @@ class MutationBuffer {
|
|
|
11411
11419
|
blockSelector: this.blockSelector,
|
|
11412
11420
|
maskTextClass: this.maskTextClass,
|
|
11413
11421
|
maskTextSelector: this.maskTextSelector,
|
|
11422
|
+
ignoreAttribute: this.ignoreAttribute || "",
|
|
11414
11423
|
skipChild: true,
|
|
11415
11424
|
newlyAddedElement: true,
|
|
11416
11425
|
inlineStylesheet: this.inlineStylesheet,
|
|
@@ -11639,7 +11648,7 @@ class MutationBuffer {
|
|
|
11639
11648
|
if (attributeName === "type" && target.tagName === "INPUT" && (m.oldValue || "").toLowerCase() === "password") {
|
|
11640
11649
|
target.setAttribute("data-rr-is-password", "true");
|
|
11641
11650
|
}
|
|
11642
|
-
if (!
|
|
11651
|
+
if (!isIgnoreAttribute(target.tagName, attributeName)) {
|
|
11643
11652
|
item.attributes[attributeName] = transformAttribute(
|
|
11644
11653
|
this.doc,
|
|
11645
11654
|
toLowerCase(target.tagName),
|
|
@@ -11758,6 +11767,7 @@ class MutationBuffer {
|
|
|
11758
11767
|
"blockSelector",
|
|
11759
11768
|
"maskTextClass",
|
|
11760
11769
|
"maskTextSelector",
|
|
11770
|
+
"ignoreAttribute",
|
|
11761
11771
|
"inlineStylesheet",
|
|
11762
11772
|
"maskInputOptions",
|
|
11763
11773
|
"maskTextFn",
|
|
@@ -14003,6 +14013,7 @@ function record(options = {}) {
|
|
|
14003
14013
|
blockSelector = null,
|
|
14004
14014
|
ignoreClass = "rr-ignore",
|
|
14005
14015
|
ignoreSelector = null,
|
|
14016
|
+
ignoreAttribute = "rr-ignore-attribute",
|
|
14006
14017
|
maskTextClass = "rr-mask",
|
|
14007
14018
|
maskTextSelector = null,
|
|
14008
14019
|
inlineStylesheet = true,
|
|
@@ -14194,7 +14205,7 @@ function record(options = {}) {
|
|
|
14194
14205
|
canvasManager = new CanvasManager({
|
|
14195
14206
|
recordCanvas,
|
|
14196
14207
|
mutationCb: wrappedCanvasMutationEmit,
|
|
14197
|
-
win
|
|
14208
|
+
win,
|
|
14198
14209
|
blockClass,
|
|
14199
14210
|
blockSelector,
|
|
14200
14211
|
mirror,
|
|
@@ -14209,6 +14220,7 @@ function record(options = {}) {
|
|
|
14209
14220
|
blockSelector,
|
|
14210
14221
|
maskTextClass,
|
|
14211
14222
|
maskTextSelector,
|
|
14223
|
+
ignoreAttribute,
|
|
14212
14224
|
inlineStylesheet,
|
|
14213
14225
|
maskInputOptions,
|
|
14214
14226
|
dataURLOptions,
|
|
@@ -14235,8 +14247,8 @@ function record(options = {}) {
|
|
|
14235
14247
|
type: EventType.Meta,
|
|
14236
14248
|
data: {
|
|
14237
14249
|
href: win.location.href,
|
|
14238
|
-
width: getWindowWidth(),
|
|
14239
|
-
height: getWindowHeight()
|
|
14250
|
+
width: getWindowWidth(win),
|
|
14251
|
+
height: getWindowHeight(win)
|
|
14240
14252
|
}
|
|
14241
14253
|
},
|
|
14242
14254
|
isCheckout
|
|
@@ -14244,7 +14256,7 @@ function record(options = {}) {
|
|
|
14244
14256
|
stylesheetManager.reset();
|
|
14245
14257
|
shadowDomManager.init();
|
|
14246
14258
|
mutationBuffers.forEach((buf) => buf.lock());
|
|
14247
|
-
const node2 = snapshot(
|
|
14259
|
+
const node2 = snapshot(doc, {
|
|
14248
14260
|
mirror,
|
|
14249
14261
|
blockClass,
|
|
14250
14262
|
blockSelector,
|
|
@@ -14266,7 +14278,7 @@ function record(options = {}) {
|
|
|
14266
14278
|
stylesheetManager.trackLinkElement(n2);
|
|
14267
14279
|
}
|
|
14268
14280
|
if (hasShadowRoot(n2)) {
|
|
14269
|
-
shadowDomManager.addShadowRoot(index.shadowRoot(n2),
|
|
14281
|
+
shadowDomManager.addShadowRoot(index.shadowRoot(n2), doc);
|
|
14270
14282
|
}
|
|
14271
14283
|
},
|
|
14272
14284
|
onIframeLoad: (iframe, childSn) => {
|
|
@@ -14286,7 +14298,7 @@ function record(options = {}) {
|
|
|
14286
14298
|
type: EventType.FullSnapshot,
|
|
14287
14299
|
data: {
|
|
14288
14300
|
node: node2,
|
|
14289
|
-
initialOffset: getWindowScroll(
|
|
14301
|
+
initialOffset: getWindowScroll(win)
|
|
14290
14302
|
}
|
|
14291
14303
|
},
|
|
14292
14304
|
isCheckout
|
|
@@ -14385,6 +14397,7 @@ function record(options = {}) {
|
|
|
14385
14397
|
ignoreSelector,
|
|
14386
14398
|
maskTextClass,
|
|
14387
14399
|
maskTextSelector,
|
|
14400
|
+
ignoreAttribute,
|
|
14388
14401
|
maskInputOptions,
|
|
14389
14402
|
inlineStylesheet,
|
|
14390
14403
|
sampling,
|
|
@@ -14431,7 +14444,7 @@ function record(options = {}) {
|
|
|
14431
14444
|
});
|
|
14432
14445
|
const init = () => {
|
|
14433
14446
|
takeFullSnapshot$1();
|
|
14434
|
-
handlers.push(observe(
|
|
14447
|
+
handlers.push(observe(doc));
|
|
14435
14448
|
recording = true;
|
|
14436
14449
|
};
|
|
14437
14450
|
if (doc.readyState === "interactive" || doc.readyState === "complete") {
|
|
@@ -14456,7 +14469,7 @@ function record(options = {}) {
|
|
|
14456
14469
|
});
|
|
14457
14470
|
if (recordAfter === "load") init();
|
|
14458
14471
|
},
|
|
14459
|
-
|
|
14472
|
+
win
|
|
14460
14473
|
)
|
|
14461
14474
|
);
|
|
14462
14475
|
}
|