@appsurify-testmap/rrweb-record 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-record.cjs +128 -117
- package/dist/rrweb-record.cjs.map +1 -1
- package/dist/rrweb-record.js +128 -117
- package/dist/rrweb-record.js.map +1 -1
- package/dist/rrweb-record.umd.cjs +130 -117
- package/dist/rrweb-record.umd.cjs.map +3 -3
- package/dist/rrweb-record.umd.min.cjs +24 -24
- package/dist/rrweb-record.umd.min.cjs.map +3 -3
- package/package.json +3 -3
|
@@ -560,7 +560,7 @@ function getXPath(node2) {
|
|
|
560
560
|
return "/html/body";
|
|
561
561
|
}
|
|
562
562
|
const parentNode2 = element.parentNode;
|
|
563
|
-
if (!parentNode2
|
|
563
|
+
if (!parentNode2) {
|
|
564
564
|
return "";
|
|
565
565
|
}
|
|
566
566
|
const siblings = Array.from(parentNode2.children).filter(
|
|
@@ -622,14 +622,21 @@ function isTextVisible(n2) {
|
|
|
622
622
|
return textContent2 !== "";
|
|
623
623
|
}
|
|
624
624
|
function isElementVisible(n2) {
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
const style =
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
return
|
|
625
|
+
var _a3;
|
|
626
|
+
var _a2;
|
|
627
|
+
const win = (_a3 = (_a2 = n2.ownerDocument) == null ? void 0 : _a2.defaultView) != null ? _a3 : null;
|
|
628
|
+
const style = win ? win.getComputedStyle(n2) : null;
|
|
629
|
+
const isStyleVisible = style != null && style.display !== "none" && style.visibility !== "hidden" && parseFloat(style.opacity) !== 0;
|
|
630
|
+
const rect = n2.getBoundingClientRect();
|
|
631
|
+
const result2 = isStyleVisible && isRectVisible(rect, win);
|
|
632
|
+
return result2;
|
|
633
|
+
}
|
|
634
|
+
function isRectVisible(rect, win) {
|
|
635
|
+
var _a3, _b2, _c2, _d2;
|
|
636
|
+
var _a2, _b, _c, _d;
|
|
637
|
+
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;
|
|
638
|
+
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;
|
|
639
|
+
return rect.width > 0 && rect.height > 0 && rect.top >= 0 && rect.left >= 0 && rect.bottom <= height && rect.right <= width;
|
|
633
640
|
}
|
|
634
641
|
const interactiveEvents$1 = [
|
|
635
642
|
"change",
|
|
@@ -669,7 +676,7 @@ const interactiveTags = [
|
|
|
669
676
|
"video",
|
|
670
677
|
"audio"
|
|
671
678
|
];
|
|
672
|
-
const inlineEventAttributes
|
|
679
|
+
const inlineEventAttributes = [
|
|
673
680
|
"onclick",
|
|
674
681
|
"ondblclick",
|
|
675
682
|
"onmousedown",
|
|
@@ -694,25 +701,31 @@ const inlineEventAttributes$1 = [
|
|
|
694
701
|
"ontouchcancel"
|
|
695
702
|
];
|
|
696
703
|
const interactiveElementsRegistry$1 = /* @__PURE__ */ new WeakSet();
|
|
697
|
-
|
|
698
|
-
EventTarget.prototype.addEventListener
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
+
if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
|
|
705
|
+
const originalAddEventListener = EventTarget.prototype.addEventListener;
|
|
706
|
+
EventTarget.prototype.addEventListener = function(type, listener, options) {
|
|
707
|
+
originalAddEventListener.call(this, type, listener, options);
|
|
708
|
+
if (this instanceof Element) {
|
|
709
|
+
const eventType = type.toLowerCase();
|
|
710
|
+
if (interactiveEvents$1.includes(eventType)) {
|
|
711
|
+
interactiveElementsRegistry$1.add(this);
|
|
712
|
+
}
|
|
704
713
|
}
|
|
705
|
-
}
|
|
706
|
-
}
|
|
707
|
-
|
|
708
|
-
EventTarget.prototype.removeEventListener
|
|
709
|
-
|
|
710
|
-
|
|
714
|
+
};
|
|
715
|
+
}
|
|
716
|
+
if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
|
|
717
|
+
const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
|
|
718
|
+
EventTarget.prototype.removeEventListener = function(type, listener, options) {
|
|
719
|
+
originalRemoveEventListener.call(this, type, listener, options);
|
|
720
|
+
if (this instanceof Element) {
|
|
721
|
+
type.toLowerCase();
|
|
722
|
+
}
|
|
723
|
+
};
|
|
724
|
+
}
|
|
711
725
|
function hasEventListeners(n2) {
|
|
712
726
|
return n2 instanceof Element && interactiveElementsRegistry$1.has(n2);
|
|
713
727
|
}
|
|
714
728
|
function isElementInteractive(n2) {
|
|
715
|
-
var _a2;
|
|
716
729
|
if (n2.nodeType === Node.ELEMENT_NODE) {
|
|
717
730
|
const element = n2;
|
|
718
731
|
const tagName = element.tagName.toLowerCase();
|
|
@@ -726,30 +739,35 @@ function isElementInteractive(n2) {
|
|
|
726
739
|
const result2 = hasEventListeners(element) || hasTabIndex || hasRoleInteractive || element instanceof HTMLAnchorElement && element.hasAttribute("href") || element instanceof HTMLButtonElement && !element.disabled;
|
|
727
740
|
return result2;
|
|
728
741
|
}
|
|
729
|
-
if (n2.nodeType === Node.TEXT_NODE) {
|
|
730
|
-
const textNode = n2;
|
|
731
|
-
const parentElement2 = textNode.parentElement;
|
|
732
|
-
if (parentElement2 !== null && interactiveTags.includes(parentElement2.tagName.toLowerCase())) {
|
|
733
|
-
return true;
|
|
734
|
-
}
|
|
735
|
-
return parentElement2 !== null && isElementVisible(parentElement2) && ((_a2 = textNode.textContent) == null ? void 0 : _a2.trim().length) !== 0 && isElementInteractive(parentElement2);
|
|
736
|
-
}
|
|
737
742
|
return false;
|
|
738
743
|
}
|
|
739
|
-
function inspectInlineEventHandlers
|
|
740
|
-
|
|
744
|
+
function inspectInlineEventHandlers(doc) {
|
|
745
|
+
if (!doc || typeof doc.querySelectorAll !== "function") return;
|
|
746
|
+
const allElements = doc.querySelectorAll("*");
|
|
741
747
|
allElements.forEach((el) => {
|
|
742
|
-
inlineEventAttributes
|
|
748
|
+
inlineEventAttributes.forEach((attr) => {
|
|
743
749
|
if (el.hasAttribute(attr)) {
|
|
744
750
|
interactiveElementsRegistry$1.add(el);
|
|
745
751
|
}
|
|
746
752
|
});
|
|
747
753
|
});
|
|
748
754
|
}
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
755
|
+
function scheduleInlineEventInspection(doc) {
|
|
756
|
+
if (!doc || typeof doc.addEventListener !== "function" || typeof doc.querySelectorAll !== "function") {
|
|
757
|
+
return;
|
|
758
|
+
}
|
|
759
|
+
try {
|
|
760
|
+
if (doc.readyState === "complete" || doc.readyState === "interactive") {
|
|
761
|
+
inspectInlineEventHandlers(doc);
|
|
762
|
+
} else {
|
|
763
|
+
doc.addEventListener("DOMContentLoaded", () => inspectInlineEventHandlers(doc), {
|
|
764
|
+
once: true,
|
|
765
|
+
capture: false
|
|
766
|
+
});
|
|
767
|
+
}
|
|
768
|
+
} catch (e2) {
|
|
769
|
+
console.warn("[inlineEventInspection] Failed to inspect document:", e2);
|
|
770
|
+
}
|
|
753
771
|
}
|
|
754
772
|
let _id = 1;
|
|
755
773
|
const tagNameRegex = new RegExp("[^a-z0-9-_:]");
|
|
@@ -868,9 +886,29 @@ function transformAttribute(doc, tagName, name, value) {
|
|
|
868
886
|
}
|
|
869
887
|
return value;
|
|
870
888
|
}
|
|
871
|
-
function
|
|
889
|
+
function isIgnoreAttribute(tagName, name, _value) {
|
|
872
890
|
return (tagName === "video" || tagName === "audio") && name === "autoplay";
|
|
873
891
|
}
|
|
892
|
+
function cleanAttributes(doc, element, ignoreAttribute) {
|
|
893
|
+
const tagName = getValidTagName$1(element);
|
|
894
|
+
const attributes = {};
|
|
895
|
+
const len = element.attributes.length;
|
|
896
|
+
for (let i2 = 0; i2 < len; i2++) {
|
|
897
|
+
const attr = element.attributes[i2];
|
|
898
|
+
const name = attr.name;
|
|
899
|
+
const value = attr.value;
|
|
900
|
+
const shouldIgnoreByName = typeof ignoreAttribute === "string" ? name === ignoreAttribute : ignoreAttribute.test(name);
|
|
901
|
+
if (!shouldIgnoreByName && !isIgnoreAttribute(tagName, name)) {
|
|
902
|
+
attributes[name] = transformAttribute(
|
|
903
|
+
doc,
|
|
904
|
+
tagName,
|
|
905
|
+
toLowerCase(name),
|
|
906
|
+
value
|
|
907
|
+
);
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
return attributes;
|
|
911
|
+
}
|
|
874
912
|
function _isBlockedElement(element, blockClass, blockSelector) {
|
|
875
913
|
try {
|
|
876
914
|
if (typeof blockClass === "string") {
|
|
@@ -1000,6 +1038,7 @@ function serializeNode(n2, options) {
|
|
|
1000
1038
|
mirror: mirror2,
|
|
1001
1039
|
blockClass,
|
|
1002
1040
|
blockSelector,
|
|
1041
|
+
ignoreAttribute,
|
|
1003
1042
|
needsMask,
|
|
1004
1043
|
inlineStylesheet,
|
|
1005
1044
|
maskInputOptions = {},
|
|
@@ -1044,6 +1083,7 @@ function serializeNode(n2, options) {
|
|
|
1044
1083
|
doc,
|
|
1045
1084
|
blockClass,
|
|
1046
1085
|
blockSelector,
|
|
1086
|
+
ignoreAttribute,
|
|
1047
1087
|
inlineStylesheet,
|
|
1048
1088
|
maskInputOptions,
|
|
1049
1089
|
maskInputFn,
|
|
@@ -1121,6 +1161,7 @@ function serializeElementNode(n2, options) {
|
|
|
1121
1161
|
doc,
|
|
1122
1162
|
blockClass,
|
|
1123
1163
|
blockSelector,
|
|
1164
|
+
ignoreAttribute,
|
|
1124
1165
|
inlineStylesheet,
|
|
1125
1166
|
maskInputOptions = {},
|
|
1126
1167
|
maskInputFn,
|
|
@@ -1134,19 +1175,7 @@ function serializeElementNode(n2, options) {
|
|
|
1134
1175
|
} = options;
|
|
1135
1176
|
const needBlock = _isBlockedElement(n2, blockClass, blockSelector);
|
|
1136
1177
|
const tagName = getValidTagName$1(n2);
|
|
1137
|
-
let attributes =
|
|
1138
|
-
const len = n2.attributes.length;
|
|
1139
|
-
for (let i2 = 0; i2 < len; i2++) {
|
|
1140
|
-
const attr = n2.attributes[i2];
|
|
1141
|
-
if (!ignoreAttribute(tagName, attr.name, attr.value)) {
|
|
1142
|
-
attributes[attr.name] = transformAttribute(
|
|
1143
|
-
doc,
|
|
1144
|
-
tagName,
|
|
1145
|
-
toLowerCase(attr.name),
|
|
1146
|
-
attr.value
|
|
1147
|
-
);
|
|
1148
|
-
}
|
|
1149
|
-
}
|
|
1178
|
+
let attributes = cleanAttributes(doc, n2, ignoreAttribute);
|
|
1150
1179
|
if (tagName === "link" && inlineStylesheet) {
|
|
1151
1180
|
const stylesheet = Array.from(doc.styleSheets).find((s2) => {
|
|
1152
1181
|
return s2.href === n2.href;
|
|
@@ -1360,6 +1389,7 @@ function serializeNodeWithId(n2, options) {
|
|
|
1360
1389
|
blockSelector,
|
|
1361
1390
|
maskTextClass,
|
|
1362
1391
|
maskTextSelector,
|
|
1392
|
+
ignoreAttribute,
|
|
1363
1393
|
skipChild = false,
|
|
1364
1394
|
inlineStylesheet = true,
|
|
1365
1395
|
maskInputOptions = {},
|
|
@@ -1394,6 +1424,7 @@ function serializeNodeWithId(n2, options) {
|
|
|
1394
1424
|
mirror: mirror2,
|
|
1395
1425
|
blockClass,
|
|
1396
1426
|
blockSelector,
|
|
1427
|
+
ignoreAttribute,
|
|
1397
1428
|
needsMask,
|
|
1398
1429
|
inlineStylesheet,
|
|
1399
1430
|
maskInputOptions,
|
|
@@ -1446,6 +1477,7 @@ function serializeNodeWithId(n2, options) {
|
|
|
1446
1477
|
needsMask,
|
|
1447
1478
|
maskTextClass,
|
|
1448
1479
|
maskTextSelector,
|
|
1480
|
+
ignoreAttribute,
|
|
1449
1481
|
skipChild,
|
|
1450
1482
|
inlineStylesheet,
|
|
1451
1483
|
maskInputOptions,
|
|
@@ -1505,6 +1537,7 @@ function serializeNodeWithId(n2, options) {
|
|
|
1505
1537
|
needsMask,
|
|
1506
1538
|
maskTextClass,
|
|
1507
1539
|
maskTextSelector,
|
|
1540
|
+
ignoreAttribute,
|
|
1508
1541
|
skipChild: false,
|
|
1509
1542
|
inlineStylesheet,
|
|
1510
1543
|
maskInputOptions,
|
|
@@ -1546,6 +1579,7 @@ function serializeNodeWithId(n2, options) {
|
|
|
1546
1579
|
needsMask,
|
|
1547
1580
|
maskTextClass,
|
|
1548
1581
|
maskTextSelector,
|
|
1582
|
+
ignoreAttribute,
|
|
1549
1583
|
skipChild: false,
|
|
1550
1584
|
inlineStylesheet,
|
|
1551
1585
|
maskInputOptions,
|
|
@@ -1583,6 +1617,7 @@ function snapshot(n2, options) {
|
|
|
1583
1617
|
blockSelector = null,
|
|
1584
1618
|
maskTextClass = "rr-mask",
|
|
1585
1619
|
maskTextSelector = null,
|
|
1620
|
+
ignoreAttribute = "rr-ignore-attr",
|
|
1586
1621
|
inlineStylesheet = true,
|
|
1587
1622
|
inlineImages = false,
|
|
1588
1623
|
recordCanvas = false,
|
|
@@ -1599,6 +1634,7 @@ function snapshot(n2, options) {
|
|
|
1599
1634
|
stylesheetLoadTimeout,
|
|
1600
1635
|
keepIframeSrcFn = () => false
|
|
1601
1636
|
} = options || {};
|
|
1637
|
+
scheduleInlineEventInspection(n2);
|
|
1602
1638
|
const maskInputOptions = maskAllInputs === true ? {
|
|
1603
1639
|
color: true,
|
|
1604
1640
|
date: true,
|
|
@@ -1642,6 +1678,7 @@ function snapshot(n2, options) {
|
|
|
1642
1678
|
blockSelector,
|
|
1643
1679
|
maskTextClass,
|
|
1644
1680
|
maskTextSelector,
|
|
1681
|
+
ignoreAttribute,
|
|
1645
1682
|
skipChild: false,
|
|
1646
1683
|
inlineStylesheet,
|
|
1647
1684
|
maskInputOptions,
|
|
@@ -5242,59 +5279,27 @@ const interactiveEvents = [
|
|
|
5242
5279
|
"touchend",
|
|
5243
5280
|
"touchcancel"
|
|
5244
5281
|
];
|
|
5245
|
-
const inlineEventAttributes = [
|
|
5246
|
-
"onclick",
|
|
5247
|
-
"ondblclick",
|
|
5248
|
-
"onmousedown",
|
|
5249
|
-
"onmouseup",
|
|
5250
|
-
"onmouseover",
|
|
5251
|
-
"onmouseout",
|
|
5252
|
-
"onmousemove",
|
|
5253
|
-
"onfocus",
|
|
5254
|
-
"onblur",
|
|
5255
|
-
"onkeydown",
|
|
5256
|
-
"onkeypress",
|
|
5257
|
-
"onkeyup",
|
|
5258
|
-
"onchange",
|
|
5259
|
-
"oninput",
|
|
5260
|
-
"onsubmit",
|
|
5261
|
-
"onreset",
|
|
5262
|
-
"onselect",
|
|
5263
|
-
"oncontextmenu",
|
|
5264
|
-
"ontouchstart",
|
|
5265
|
-
"ontouchmove",
|
|
5266
|
-
"ontouchend",
|
|
5267
|
-
"ontouchcancel"
|
|
5268
|
-
];
|
|
5269
5282
|
const interactiveElementsRegistry = /* @__PURE__ */ new WeakSet();
|
|
5270
|
-
|
|
5271
|
-
EventTarget.prototype.addEventListener
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
|
|
5277
|
-
|
|
5278
|
-
}
|
|
5279
|
-
};
|
|
5280
|
-
const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
|
|
5281
|
-
EventTarget.prototype.removeEventListener = function(type, listener, options) {
|
|
5282
|
-
originalRemoveEventListener.call(this, type, listener, options);
|
|
5283
|
-
};
|
|
5284
|
-
function inspectInlineEventHandlers() {
|
|
5285
|
-
const allElements = document.querySelectorAll("*");
|
|
5286
|
-
allElements.forEach((el) => {
|
|
5287
|
-
inlineEventAttributes.forEach((attr) => {
|
|
5288
|
-
if (el.hasAttribute(attr)) {
|
|
5289
|
-
interactiveElementsRegistry.add(el);
|
|
5283
|
+
if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
|
|
5284
|
+
const originalAddEventListener = EventTarget.prototype.addEventListener;
|
|
5285
|
+
EventTarget.prototype.addEventListener = function(type, listener, options) {
|
|
5286
|
+
originalAddEventListener.call(this, type, listener, options);
|
|
5287
|
+
if (this instanceof Element) {
|
|
5288
|
+
const eventType = type.toLowerCase();
|
|
5289
|
+
if (interactiveEvents.includes(eventType)) {
|
|
5290
|
+
interactiveElementsRegistry.add(this);
|
|
5290
5291
|
}
|
|
5291
|
-
}
|
|
5292
|
-
}
|
|
5292
|
+
}
|
|
5293
|
+
};
|
|
5293
5294
|
}
|
|
5294
|
-
if (
|
|
5295
|
-
|
|
5296
|
-
|
|
5297
|
-
|
|
5295
|
+
if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
|
|
5296
|
+
const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
|
|
5297
|
+
EventTarget.prototype.removeEventListener = function(type, listener, options) {
|
|
5298
|
+
originalRemoveEventListener.call(this, type, listener, options);
|
|
5299
|
+
if (this instanceof Element) {
|
|
5300
|
+
type.toLowerCase();
|
|
5301
|
+
}
|
|
5302
|
+
};
|
|
5298
5303
|
}
|
|
5299
5304
|
function getDefaultExportFromCjs(x2) {
|
|
5300
5305
|
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
|
|
@@ -9159,7 +9164,7 @@ let nowTimestamp = Date.now;
|
|
|
9159
9164
|
if (!/* @__PURE__ */ /[1-9][0-9]{12}/.test(Date.now().toString())) {
|
|
9160
9165
|
nowTimestamp = () => (/* @__PURE__ */ new Date()).getTime();
|
|
9161
9166
|
}
|
|
9162
|
-
function getWindowScroll(win) {
|
|
9167
|
+
function getWindowScroll(win = window) {
|
|
9163
9168
|
var _a2, _b, _c, _d;
|
|
9164
9169
|
const doc = win.document;
|
|
9165
9170
|
return {
|
|
@@ -9167,11 +9172,13 @@ function getWindowScroll(win) {
|
|
|
9167
9172
|
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
|
|
9168
9173
|
};
|
|
9169
9174
|
}
|
|
9170
|
-
function getWindowHeight() {
|
|
9171
|
-
|
|
9175
|
+
function getWindowHeight(win = window) {
|
|
9176
|
+
const doc = win.document;
|
|
9177
|
+
return win.innerHeight || doc.documentElement && doc.documentElement.clientHeight || doc.body && doc.body.clientHeight || 0;
|
|
9172
9178
|
}
|
|
9173
|
-
function getWindowWidth() {
|
|
9174
|
-
|
|
9179
|
+
function getWindowWidth(win = window) {
|
|
9180
|
+
const doc = win.document;
|
|
9181
|
+
return win.innerWidth || doc.documentElement && doc.documentElement.clientWidth || doc.body && doc.body.clientWidth || 0;
|
|
9175
9182
|
}
|
|
9176
9183
|
function closestElementOfNode(node2) {
|
|
9177
9184
|
if (!node2) {
|
|
@@ -9491,6 +9498,7 @@ class MutationBuffer {
|
|
|
9491
9498
|
__publicField(this, "blockSelector");
|
|
9492
9499
|
__publicField(this, "maskTextClass");
|
|
9493
9500
|
__publicField(this, "maskTextSelector");
|
|
9501
|
+
__publicField(this, "ignoreAttribute");
|
|
9494
9502
|
__publicField(this, "inlineStylesheet");
|
|
9495
9503
|
__publicField(this, "maskInputOptions");
|
|
9496
9504
|
__publicField(this, "maskTextFn");
|
|
@@ -9554,6 +9562,7 @@ class MutationBuffer {
|
|
|
9554
9562
|
blockSelector: this.blockSelector,
|
|
9555
9563
|
maskTextClass: this.maskTextClass,
|
|
9556
9564
|
maskTextSelector: this.maskTextSelector,
|
|
9565
|
+
ignoreAttribute: this.ignoreAttribute || "",
|
|
9557
9566
|
skipChild: true,
|
|
9558
9567
|
newlyAddedElement: true,
|
|
9559
9568
|
inlineStylesheet: this.inlineStylesheet,
|
|
@@ -9782,7 +9791,7 @@ class MutationBuffer {
|
|
|
9782
9791
|
if (attributeName === "type" && target.tagName === "INPUT" && (m.oldValue || "").toLowerCase() === "password") {
|
|
9783
9792
|
target.setAttribute("data-rr-is-password", "true");
|
|
9784
9793
|
}
|
|
9785
|
-
if (!
|
|
9794
|
+
if (!isIgnoreAttribute(target.tagName, attributeName)) {
|
|
9786
9795
|
item.attributes[attributeName] = transformAttribute(
|
|
9787
9796
|
this.doc,
|
|
9788
9797
|
toLowerCase(target.tagName),
|
|
@@ -9901,6 +9910,7 @@ class MutationBuffer {
|
|
|
9901
9910
|
"blockSelector",
|
|
9902
9911
|
"maskTextClass",
|
|
9903
9912
|
"maskTextSelector",
|
|
9913
|
+
"ignoreAttribute",
|
|
9904
9914
|
"inlineStylesheet",
|
|
9905
9915
|
"maskInputOptions",
|
|
9906
9916
|
"maskTextFn",
|
|
@@ -12126,6 +12136,7 @@ function record(options = {}) {
|
|
|
12126
12136
|
blockSelector = null,
|
|
12127
12137
|
ignoreClass = "rr-ignore",
|
|
12128
12138
|
ignoreSelector = null,
|
|
12139
|
+
ignoreAttribute = "rr-ignore-attribute",
|
|
12129
12140
|
maskTextClass = "rr-mask",
|
|
12130
12141
|
maskTextSelector = null,
|
|
12131
12142
|
inlineStylesheet = true,
|
|
@@ -12317,7 +12328,7 @@ function record(options = {}) {
|
|
|
12317
12328
|
canvasManager = new CanvasManager({
|
|
12318
12329
|
recordCanvas,
|
|
12319
12330
|
mutationCb: wrappedCanvasMutationEmit,
|
|
12320
|
-
win
|
|
12331
|
+
win,
|
|
12321
12332
|
blockClass,
|
|
12322
12333
|
blockSelector,
|
|
12323
12334
|
mirror,
|
|
@@ -12332,6 +12343,7 @@ function record(options = {}) {
|
|
|
12332
12343
|
blockSelector,
|
|
12333
12344
|
maskTextClass,
|
|
12334
12345
|
maskTextSelector,
|
|
12346
|
+
ignoreAttribute,
|
|
12335
12347
|
inlineStylesheet,
|
|
12336
12348
|
maskInputOptions,
|
|
12337
12349
|
dataURLOptions,
|
|
@@ -12358,8 +12370,8 @@ function record(options = {}) {
|
|
|
12358
12370
|
type: EventType.Meta,
|
|
12359
12371
|
data: {
|
|
12360
12372
|
href: win.location.href,
|
|
12361
|
-
width: getWindowWidth(),
|
|
12362
|
-
height: getWindowHeight()
|
|
12373
|
+
width: getWindowWidth(win),
|
|
12374
|
+
height: getWindowHeight(win)
|
|
12363
12375
|
}
|
|
12364
12376
|
},
|
|
12365
12377
|
isCheckout
|
|
@@ -12367,7 +12379,7 @@ function record(options = {}) {
|
|
|
12367
12379
|
stylesheetManager.reset();
|
|
12368
12380
|
shadowDomManager.init();
|
|
12369
12381
|
mutationBuffers.forEach((buf) => buf.lock());
|
|
12370
|
-
const node2 = snapshot(
|
|
12382
|
+
const node2 = snapshot(doc, {
|
|
12371
12383
|
mirror,
|
|
12372
12384
|
blockClass,
|
|
12373
12385
|
blockSelector,
|
|
@@ -12389,7 +12401,7 @@ function record(options = {}) {
|
|
|
12389
12401
|
stylesheetManager.trackLinkElement(n2);
|
|
12390
12402
|
}
|
|
12391
12403
|
if (hasShadowRoot(n2)) {
|
|
12392
|
-
shadowDomManager.addShadowRoot(index.shadowRoot(n2),
|
|
12404
|
+
shadowDomManager.addShadowRoot(index.shadowRoot(n2), doc);
|
|
12393
12405
|
}
|
|
12394
12406
|
},
|
|
12395
12407
|
onIframeLoad: (iframe, childSn) => {
|
|
@@ -12409,7 +12421,7 @@ function record(options = {}) {
|
|
|
12409
12421
|
type: EventType.FullSnapshot,
|
|
12410
12422
|
data: {
|
|
12411
12423
|
node: node2,
|
|
12412
|
-
initialOffset: getWindowScroll(
|
|
12424
|
+
initialOffset: getWindowScroll(win)
|
|
12413
12425
|
}
|
|
12414
12426
|
},
|
|
12415
12427
|
isCheckout
|
|
@@ -12508,6 +12520,7 @@ function record(options = {}) {
|
|
|
12508
12520
|
ignoreSelector,
|
|
12509
12521
|
maskTextClass,
|
|
12510
12522
|
maskTextSelector,
|
|
12523
|
+
ignoreAttribute,
|
|
12511
12524
|
maskInputOptions,
|
|
12512
12525
|
inlineStylesheet,
|
|
12513
12526
|
sampling,
|
|
@@ -12554,7 +12567,7 @@ function record(options = {}) {
|
|
|
12554
12567
|
});
|
|
12555
12568
|
const init = () => {
|
|
12556
12569
|
takeFullSnapshot$1();
|
|
12557
|
-
handlers.push(observe(
|
|
12570
|
+
handlers.push(observe(doc));
|
|
12558
12571
|
recording = true;
|
|
12559
12572
|
};
|
|
12560
12573
|
if (doc.readyState === "interactive" || doc.readyState === "complete") {
|
|
@@ -12579,7 +12592,7 @@ function record(options = {}) {
|
|
|
12579
12592
|
});
|
|
12580
12593
|
if (recordAfter === "load") init();
|
|
12581
12594
|
},
|
|
12582
|
-
|
|
12595
|
+
win
|
|
12583
12596
|
)
|
|
12584
12597
|
);
|
|
12585
12598
|
}
|