@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
package/dist/rrweb-record.cjs
CHANGED
|
@@ -515,7 +515,7 @@ function getXPath(node2) {
|
|
|
515
515
|
return "/html/body";
|
|
516
516
|
}
|
|
517
517
|
const parentNode2 = element.parentNode;
|
|
518
|
-
if (!parentNode2
|
|
518
|
+
if (!parentNode2) {
|
|
519
519
|
return "";
|
|
520
520
|
}
|
|
521
521
|
const siblings = Array.from(parentNode2.children).filter(
|
|
@@ -577,14 +577,19 @@ function isTextVisible(n2) {
|
|
|
577
577
|
return textContent2 !== "";
|
|
578
578
|
}
|
|
579
579
|
function isElementVisible(n2) {
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
const
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
580
|
+
var _a2;
|
|
581
|
+
const win = ((_a2 = n2.ownerDocument) == null ? void 0 : _a2.defaultView) ?? null;
|
|
582
|
+
const style = win ? win.getComputedStyle(n2) : null;
|
|
583
|
+
const isStyleVisible = style != null && style.display !== "none" && style.visibility !== "hidden" && parseFloat(style.opacity) !== 0;
|
|
584
|
+
const rect = n2.getBoundingClientRect();
|
|
585
|
+
const result2 = isStyleVisible && isRectVisible(rect, win);
|
|
586
|
+
return result2;
|
|
587
|
+
}
|
|
588
|
+
function isRectVisible(rect, win) {
|
|
589
|
+
var _a2, _b, _c, _d;
|
|
590
|
+
const height = (win == null ? void 0 : win.innerHeight) ?? ((_b = (_a2 = win == null ? void 0 : win.document) == null ? void 0 : _a2.documentElement) == null ? void 0 : _b.clientHeight) ?? 0;
|
|
591
|
+
const width = (win == null ? void 0 : win.innerWidth) ?? ((_d = (_c = win == null ? void 0 : win.document) == null ? void 0 : _c.documentElement) == null ? void 0 : _d.clientWidth) ?? 0;
|
|
592
|
+
return rect.width > 0 && rect.height > 0 && rect.top >= 0 && rect.left >= 0 && rect.bottom <= height && rect.right <= width;
|
|
588
593
|
}
|
|
589
594
|
const interactiveEvents$1 = [
|
|
590
595
|
"change",
|
|
@@ -624,7 +629,7 @@ const interactiveTags = [
|
|
|
624
629
|
"video",
|
|
625
630
|
"audio"
|
|
626
631
|
];
|
|
627
|
-
const inlineEventAttributes
|
|
632
|
+
const inlineEventAttributes = [
|
|
628
633
|
"onclick",
|
|
629
634
|
"ondblclick",
|
|
630
635
|
"onmousedown",
|
|
@@ -649,25 +654,31 @@ const inlineEventAttributes$1 = [
|
|
|
649
654
|
"ontouchcancel"
|
|
650
655
|
];
|
|
651
656
|
const interactiveElementsRegistry$1 = /* @__PURE__ */ new WeakSet();
|
|
652
|
-
|
|
653
|
-
EventTarget.prototype.addEventListener
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
657
|
+
if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
|
|
658
|
+
const originalAddEventListener = EventTarget.prototype.addEventListener;
|
|
659
|
+
EventTarget.prototype.addEventListener = function(type, listener, options) {
|
|
660
|
+
originalAddEventListener.call(this, type, listener, options);
|
|
661
|
+
if (this instanceof Element) {
|
|
662
|
+
const eventType = type.toLowerCase();
|
|
663
|
+
if (interactiveEvents$1.includes(eventType)) {
|
|
664
|
+
interactiveElementsRegistry$1.add(this);
|
|
665
|
+
}
|
|
659
666
|
}
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
EventTarget.prototype.removeEventListener
|
|
664
|
-
|
|
665
|
-
|
|
667
|
+
};
|
|
668
|
+
}
|
|
669
|
+
if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
|
|
670
|
+
const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
|
|
671
|
+
EventTarget.prototype.removeEventListener = function(type, listener, options) {
|
|
672
|
+
originalRemoveEventListener.call(this, type, listener, options);
|
|
673
|
+
if (this instanceof Element) {
|
|
674
|
+
type.toLowerCase();
|
|
675
|
+
}
|
|
676
|
+
};
|
|
677
|
+
}
|
|
666
678
|
function hasEventListeners(n2) {
|
|
667
679
|
return n2 instanceof Element && interactiveElementsRegistry$1.has(n2);
|
|
668
680
|
}
|
|
669
681
|
function isElementInteractive(n2) {
|
|
670
|
-
var _a2;
|
|
671
682
|
if (n2.nodeType === Node.ELEMENT_NODE) {
|
|
672
683
|
const element = n2;
|
|
673
684
|
const tagName = element.tagName.toLowerCase();
|
|
@@ -681,30 +692,35 @@ function isElementInteractive(n2) {
|
|
|
681
692
|
const result2 = hasEventListeners(element) || hasTabIndex || hasRoleInteractive || element instanceof HTMLAnchorElement && element.hasAttribute("href") || element instanceof HTMLButtonElement && !element.disabled;
|
|
682
693
|
return result2;
|
|
683
694
|
}
|
|
684
|
-
if (n2.nodeType === Node.TEXT_NODE) {
|
|
685
|
-
const textNode = n2;
|
|
686
|
-
const parentElement2 = textNode.parentElement;
|
|
687
|
-
if (parentElement2 !== null && interactiveTags.includes(parentElement2.tagName.toLowerCase())) {
|
|
688
|
-
return true;
|
|
689
|
-
}
|
|
690
|
-
return parentElement2 !== null && isElementVisible(parentElement2) && ((_a2 = textNode.textContent) == null ? void 0 : _a2.trim().length) !== 0 && isElementInteractive(parentElement2);
|
|
691
|
-
}
|
|
692
695
|
return false;
|
|
693
696
|
}
|
|
694
|
-
function inspectInlineEventHandlers
|
|
695
|
-
|
|
697
|
+
function inspectInlineEventHandlers(doc) {
|
|
698
|
+
if (!doc || typeof doc.querySelectorAll !== "function") return;
|
|
699
|
+
const allElements = doc.querySelectorAll("*");
|
|
696
700
|
allElements.forEach((el) => {
|
|
697
|
-
inlineEventAttributes
|
|
701
|
+
inlineEventAttributes.forEach((attr) => {
|
|
698
702
|
if (el.hasAttribute(attr)) {
|
|
699
703
|
interactiveElementsRegistry$1.add(el);
|
|
700
704
|
}
|
|
701
705
|
});
|
|
702
706
|
});
|
|
703
707
|
}
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
+
function scheduleInlineEventInspection(doc) {
|
|
709
|
+
if (!doc || typeof doc.addEventListener !== "function" || typeof doc.querySelectorAll !== "function") {
|
|
710
|
+
return;
|
|
711
|
+
}
|
|
712
|
+
try {
|
|
713
|
+
if (doc.readyState === "complete" || doc.readyState === "interactive") {
|
|
714
|
+
inspectInlineEventHandlers(doc);
|
|
715
|
+
} else {
|
|
716
|
+
doc.addEventListener("DOMContentLoaded", () => inspectInlineEventHandlers(doc), {
|
|
717
|
+
once: true,
|
|
718
|
+
capture: false
|
|
719
|
+
});
|
|
720
|
+
}
|
|
721
|
+
} catch (e2) {
|
|
722
|
+
console.warn("[inlineEventInspection] Failed to inspect document:", e2);
|
|
723
|
+
}
|
|
708
724
|
}
|
|
709
725
|
let _id = 1;
|
|
710
726
|
const tagNameRegex = new RegExp("[^a-z0-9-_:]");
|
|
@@ -823,9 +839,29 @@ function transformAttribute(doc, tagName, name, value) {
|
|
|
823
839
|
}
|
|
824
840
|
return value;
|
|
825
841
|
}
|
|
826
|
-
function
|
|
842
|
+
function isIgnoreAttribute(tagName, name, _value) {
|
|
827
843
|
return (tagName === "video" || tagName === "audio") && name === "autoplay";
|
|
828
844
|
}
|
|
845
|
+
function cleanAttributes(doc, element, ignoreAttribute) {
|
|
846
|
+
const tagName = getValidTagName$1(element);
|
|
847
|
+
const attributes = {};
|
|
848
|
+
const len = element.attributes.length;
|
|
849
|
+
for (let i2 = 0; i2 < len; i2++) {
|
|
850
|
+
const attr = element.attributes[i2];
|
|
851
|
+
const name = attr.name;
|
|
852
|
+
const value = attr.value;
|
|
853
|
+
const shouldIgnoreByName = typeof ignoreAttribute === "string" ? name === ignoreAttribute : ignoreAttribute.test(name);
|
|
854
|
+
if (!shouldIgnoreByName && !isIgnoreAttribute(tagName, name)) {
|
|
855
|
+
attributes[name] = transformAttribute(
|
|
856
|
+
doc,
|
|
857
|
+
tagName,
|
|
858
|
+
toLowerCase(name),
|
|
859
|
+
value
|
|
860
|
+
);
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
return attributes;
|
|
864
|
+
}
|
|
829
865
|
function _isBlockedElement(element, blockClass, blockSelector) {
|
|
830
866
|
try {
|
|
831
867
|
if (typeof blockClass === "string") {
|
|
@@ -955,6 +991,7 @@ function serializeNode(n2, options) {
|
|
|
955
991
|
mirror: mirror2,
|
|
956
992
|
blockClass,
|
|
957
993
|
blockSelector,
|
|
994
|
+
ignoreAttribute,
|
|
958
995
|
needsMask,
|
|
959
996
|
inlineStylesheet,
|
|
960
997
|
maskInputOptions = {},
|
|
@@ -999,6 +1036,7 @@ function serializeNode(n2, options) {
|
|
|
999
1036
|
doc,
|
|
1000
1037
|
blockClass,
|
|
1001
1038
|
blockSelector,
|
|
1039
|
+
ignoreAttribute,
|
|
1002
1040
|
inlineStylesheet,
|
|
1003
1041
|
maskInputOptions,
|
|
1004
1042
|
maskInputFn,
|
|
@@ -1076,6 +1114,7 @@ function serializeElementNode(n2, options) {
|
|
|
1076
1114
|
doc,
|
|
1077
1115
|
blockClass,
|
|
1078
1116
|
blockSelector,
|
|
1117
|
+
ignoreAttribute,
|
|
1079
1118
|
inlineStylesheet,
|
|
1080
1119
|
maskInputOptions = {},
|
|
1081
1120
|
maskInputFn,
|
|
@@ -1089,19 +1128,7 @@ function serializeElementNode(n2, options) {
|
|
|
1089
1128
|
} = options;
|
|
1090
1129
|
const needBlock = _isBlockedElement(n2, blockClass, blockSelector);
|
|
1091
1130
|
const tagName = getValidTagName$1(n2);
|
|
1092
|
-
let attributes =
|
|
1093
|
-
const len = n2.attributes.length;
|
|
1094
|
-
for (let i2 = 0; i2 < len; i2++) {
|
|
1095
|
-
const attr = n2.attributes[i2];
|
|
1096
|
-
if (!ignoreAttribute(tagName, attr.name, attr.value)) {
|
|
1097
|
-
attributes[attr.name] = transformAttribute(
|
|
1098
|
-
doc,
|
|
1099
|
-
tagName,
|
|
1100
|
-
toLowerCase(attr.name),
|
|
1101
|
-
attr.value
|
|
1102
|
-
);
|
|
1103
|
-
}
|
|
1104
|
-
}
|
|
1131
|
+
let attributes = cleanAttributes(doc, n2, ignoreAttribute);
|
|
1105
1132
|
if (tagName === "link" && inlineStylesheet) {
|
|
1106
1133
|
const stylesheet = Array.from(doc.styleSheets).find((s2) => {
|
|
1107
1134
|
return s2.href === n2.href;
|
|
@@ -1315,6 +1342,7 @@ function serializeNodeWithId(n2, options) {
|
|
|
1315
1342
|
blockSelector,
|
|
1316
1343
|
maskTextClass,
|
|
1317
1344
|
maskTextSelector,
|
|
1345
|
+
ignoreAttribute,
|
|
1318
1346
|
skipChild = false,
|
|
1319
1347
|
inlineStylesheet = true,
|
|
1320
1348
|
maskInputOptions = {},
|
|
@@ -1349,6 +1377,7 @@ function serializeNodeWithId(n2, options) {
|
|
|
1349
1377
|
mirror: mirror2,
|
|
1350
1378
|
blockClass,
|
|
1351
1379
|
blockSelector,
|
|
1380
|
+
ignoreAttribute,
|
|
1352
1381
|
needsMask,
|
|
1353
1382
|
inlineStylesheet,
|
|
1354
1383
|
maskInputOptions,
|
|
@@ -1401,6 +1430,7 @@ function serializeNodeWithId(n2, options) {
|
|
|
1401
1430
|
needsMask,
|
|
1402
1431
|
maskTextClass,
|
|
1403
1432
|
maskTextSelector,
|
|
1433
|
+
ignoreAttribute,
|
|
1404
1434
|
skipChild,
|
|
1405
1435
|
inlineStylesheet,
|
|
1406
1436
|
maskInputOptions,
|
|
@@ -1460,6 +1490,7 @@ function serializeNodeWithId(n2, options) {
|
|
|
1460
1490
|
needsMask,
|
|
1461
1491
|
maskTextClass,
|
|
1462
1492
|
maskTextSelector,
|
|
1493
|
+
ignoreAttribute,
|
|
1463
1494
|
skipChild: false,
|
|
1464
1495
|
inlineStylesheet,
|
|
1465
1496
|
maskInputOptions,
|
|
@@ -1501,6 +1532,7 @@ function serializeNodeWithId(n2, options) {
|
|
|
1501
1532
|
needsMask,
|
|
1502
1533
|
maskTextClass,
|
|
1503
1534
|
maskTextSelector,
|
|
1535
|
+
ignoreAttribute,
|
|
1504
1536
|
skipChild: false,
|
|
1505
1537
|
inlineStylesheet,
|
|
1506
1538
|
maskInputOptions,
|
|
@@ -1538,6 +1570,7 @@ function snapshot(n2, options) {
|
|
|
1538
1570
|
blockSelector = null,
|
|
1539
1571
|
maskTextClass = "rr-mask",
|
|
1540
1572
|
maskTextSelector = null,
|
|
1573
|
+
ignoreAttribute = "rr-ignore-attr",
|
|
1541
1574
|
inlineStylesheet = true,
|
|
1542
1575
|
inlineImages = false,
|
|
1543
1576
|
recordCanvas = false,
|
|
@@ -1554,6 +1587,7 @@ function snapshot(n2, options) {
|
|
|
1554
1587
|
stylesheetLoadTimeout,
|
|
1555
1588
|
keepIframeSrcFn = () => false
|
|
1556
1589
|
} = options || {};
|
|
1590
|
+
scheduleInlineEventInspection(n2);
|
|
1557
1591
|
const maskInputOptions = maskAllInputs === true ? {
|
|
1558
1592
|
color: true,
|
|
1559
1593
|
date: true,
|
|
@@ -1597,6 +1631,7 @@ function snapshot(n2, options) {
|
|
|
1597
1631
|
blockSelector,
|
|
1598
1632
|
maskTextClass,
|
|
1599
1633
|
maskTextSelector,
|
|
1634
|
+
ignoreAttribute,
|
|
1600
1635
|
skipChild: false,
|
|
1601
1636
|
inlineStylesheet,
|
|
1602
1637
|
maskInputOptions,
|
|
@@ -5193,59 +5228,27 @@ const interactiveEvents = [
|
|
|
5193
5228
|
"touchend",
|
|
5194
5229
|
"touchcancel"
|
|
5195
5230
|
];
|
|
5196
|
-
const inlineEventAttributes = [
|
|
5197
|
-
"onclick",
|
|
5198
|
-
"ondblclick",
|
|
5199
|
-
"onmousedown",
|
|
5200
|
-
"onmouseup",
|
|
5201
|
-
"onmouseover",
|
|
5202
|
-
"onmouseout",
|
|
5203
|
-
"onmousemove",
|
|
5204
|
-
"onfocus",
|
|
5205
|
-
"onblur",
|
|
5206
|
-
"onkeydown",
|
|
5207
|
-
"onkeypress",
|
|
5208
|
-
"onkeyup",
|
|
5209
|
-
"onchange",
|
|
5210
|
-
"oninput",
|
|
5211
|
-
"onsubmit",
|
|
5212
|
-
"onreset",
|
|
5213
|
-
"onselect",
|
|
5214
|
-
"oncontextmenu",
|
|
5215
|
-
"ontouchstart",
|
|
5216
|
-
"ontouchmove",
|
|
5217
|
-
"ontouchend",
|
|
5218
|
-
"ontouchcancel"
|
|
5219
|
-
];
|
|
5220
5231
|
const interactiveElementsRegistry = /* @__PURE__ */ new WeakSet();
|
|
5221
|
-
|
|
5222
|
-
EventTarget.prototype.addEventListener
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
}
|
|
5230
|
-
};
|
|
5231
|
-
const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
|
|
5232
|
-
EventTarget.prototype.removeEventListener = function(type, listener, options) {
|
|
5233
|
-
originalRemoveEventListener.call(this, type, listener, options);
|
|
5234
|
-
};
|
|
5235
|
-
function inspectInlineEventHandlers() {
|
|
5236
|
-
const allElements = document.querySelectorAll("*");
|
|
5237
|
-
allElements.forEach((el) => {
|
|
5238
|
-
inlineEventAttributes.forEach((attr) => {
|
|
5239
|
-
if (el.hasAttribute(attr)) {
|
|
5240
|
-
interactiveElementsRegistry.add(el);
|
|
5232
|
+
if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
|
|
5233
|
+
const originalAddEventListener = EventTarget.prototype.addEventListener;
|
|
5234
|
+
EventTarget.prototype.addEventListener = function(type, listener, options) {
|
|
5235
|
+
originalAddEventListener.call(this, type, listener, options);
|
|
5236
|
+
if (this instanceof Element) {
|
|
5237
|
+
const eventType = type.toLowerCase();
|
|
5238
|
+
if (interactiveEvents.includes(eventType)) {
|
|
5239
|
+
interactiveElementsRegistry.add(this);
|
|
5241
5240
|
}
|
|
5242
|
-
}
|
|
5243
|
-
}
|
|
5241
|
+
}
|
|
5242
|
+
};
|
|
5244
5243
|
}
|
|
5245
|
-
if (
|
|
5246
|
-
|
|
5247
|
-
|
|
5248
|
-
|
|
5244
|
+
if (typeof Element !== "undefined" && typeof EventTarget !== "undefined") {
|
|
5245
|
+
const originalRemoveEventListener = EventTarget.prototype.removeEventListener;
|
|
5246
|
+
EventTarget.prototype.removeEventListener = function(type, listener, options) {
|
|
5247
|
+
originalRemoveEventListener.call(this, type, listener, options);
|
|
5248
|
+
if (this instanceof Element) {
|
|
5249
|
+
type.toLowerCase();
|
|
5250
|
+
}
|
|
5251
|
+
};
|
|
5249
5252
|
}
|
|
5250
5253
|
function getDefaultExportFromCjs(x2) {
|
|
5251
5254
|
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
|
|
@@ -9106,7 +9109,7 @@ let nowTimestamp = Date.now;
|
|
|
9106
9109
|
if (!/* @__PURE__ */ /[1-9][0-9]{12}/.test(Date.now().toString())) {
|
|
9107
9110
|
nowTimestamp = () => (/* @__PURE__ */ new Date()).getTime();
|
|
9108
9111
|
}
|
|
9109
|
-
function getWindowScroll(win) {
|
|
9112
|
+
function getWindowScroll(win = window) {
|
|
9110
9113
|
var _a2, _b, _c, _d;
|
|
9111
9114
|
const doc = win.document;
|
|
9112
9115
|
return {
|
|
@@ -9114,11 +9117,13 @@ function getWindowScroll(win) {
|
|
|
9114
9117
|
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
|
|
9115
9118
|
};
|
|
9116
9119
|
}
|
|
9117
|
-
function getWindowHeight() {
|
|
9118
|
-
|
|
9120
|
+
function getWindowHeight(win = window) {
|
|
9121
|
+
const doc = win.document;
|
|
9122
|
+
return win.innerHeight || doc.documentElement && doc.documentElement.clientHeight || doc.body && doc.body.clientHeight || 0;
|
|
9119
9123
|
}
|
|
9120
|
-
function getWindowWidth() {
|
|
9121
|
-
|
|
9124
|
+
function getWindowWidth(win = window) {
|
|
9125
|
+
const doc = win.document;
|
|
9126
|
+
return win.innerWidth || doc.documentElement && doc.documentElement.clientWidth || doc.body && doc.body.clientWidth || 0;
|
|
9122
9127
|
}
|
|
9123
9128
|
function closestElementOfNode(node2) {
|
|
9124
9129
|
if (!node2) {
|
|
@@ -9437,6 +9442,7 @@ class MutationBuffer {
|
|
|
9437
9442
|
__publicField(this, "blockSelector");
|
|
9438
9443
|
__publicField(this, "maskTextClass");
|
|
9439
9444
|
__publicField(this, "maskTextSelector");
|
|
9445
|
+
__publicField(this, "ignoreAttribute");
|
|
9440
9446
|
__publicField(this, "inlineStylesheet");
|
|
9441
9447
|
__publicField(this, "maskInputOptions");
|
|
9442
9448
|
__publicField(this, "maskTextFn");
|
|
@@ -9500,6 +9506,7 @@ class MutationBuffer {
|
|
|
9500
9506
|
blockSelector: this.blockSelector,
|
|
9501
9507
|
maskTextClass: this.maskTextClass,
|
|
9502
9508
|
maskTextSelector: this.maskTextSelector,
|
|
9509
|
+
ignoreAttribute: this.ignoreAttribute || "",
|
|
9503
9510
|
skipChild: true,
|
|
9504
9511
|
newlyAddedElement: true,
|
|
9505
9512
|
inlineStylesheet: this.inlineStylesheet,
|
|
@@ -9728,7 +9735,7 @@ class MutationBuffer {
|
|
|
9728
9735
|
if (attributeName === "type" && target.tagName === "INPUT" && (m.oldValue || "").toLowerCase() === "password") {
|
|
9729
9736
|
target.setAttribute("data-rr-is-password", "true");
|
|
9730
9737
|
}
|
|
9731
|
-
if (!
|
|
9738
|
+
if (!isIgnoreAttribute(target.tagName, attributeName)) {
|
|
9732
9739
|
item.attributes[attributeName] = transformAttribute(
|
|
9733
9740
|
this.doc,
|
|
9734
9741
|
toLowerCase(target.tagName),
|
|
@@ -9847,6 +9854,7 @@ class MutationBuffer {
|
|
|
9847
9854
|
"blockSelector",
|
|
9848
9855
|
"maskTextClass",
|
|
9849
9856
|
"maskTextSelector",
|
|
9857
|
+
"ignoreAttribute",
|
|
9850
9858
|
"inlineStylesheet",
|
|
9851
9859
|
"maskInputOptions",
|
|
9852
9860
|
"maskTextFn",
|
|
@@ -12076,6 +12084,7 @@ function record(options = {}) {
|
|
|
12076
12084
|
blockSelector = null,
|
|
12077
12085
|
ignoreClass = "rr-ignore",
|
|
12078
12086
|
ignoreSelector = null,
|
|
12087
|
+
ignoreAttribute = "rr-ignore-attribute",
|
|
12079
12088
|
maskTextClass = "rr-mask",
|
|
12080
12089
|
maskTextSelector = null,
|
|
12081
12090
|
inlineStylesheet = true,
|
|
@@ -12271,7 +12280,7 @@ function record(options = {}) {
|
|
|
12271
12280
|
canvasManager = new CanvasManager({
|
|
12272
12281
|
recordCanvas,
|
|
12273
12282
|
mutationCb: wrappedCanvasMutationEmit,
|
|
12274
|
-
win
|
|
12283
|
+
win,
|
|
12275
12284
|
blockClass,
|
|
12276
12285
|
blockSelector,
|
|
12277
12286
|
mirror,
|
|
@@ -12286,6 +12295,7 @@ function record(options = {}) {
|
|
|
12286
12295
|
blockSelector,
|
|
12287
12296
|
maskTextClass,
|
|
12288
12297
|
maskTextSelector,
|
|
12298
|
+
ignoreAttribute,
|
|
12289
12299
|
inlineStylesheet,
|
|
12290
12300
|
maskInputOptions,
|
|
12291
12301
|
dataURLOptions,
|
|
@@ -12312,8 +12322,8 @@ function record(options = {}) {
|
|
|
12312
12322
|
type: EventType.Meta,
|
|
12313
12323
|
data: {
|
|
12314
12324
|
href: win.location.href,
|
|
12315
|
-
width: getWindowWidth(),
|
|
12316
|
-
height: getWindowHeight()
|
|
12325
|
+
width: getWindowWidth(win),
|
|
12326
|
+
height: getWindowHeight(win)
|
|
12317
12327
|
}
|
|
12318
12328
|
},
|
|
12319
12329
|
isCheckout
|
|
@@ -12321,7 +12331,7 @@ function record(options = {}) {
|
|
|
12321
12331
|
stylesheetManager.reset();
|
|
12322
12332
|
shadowDomManager.init();
|
|
12323
12333
|
mutationBuffers.forEach((buf) => buf.lock());
|
|
12324
|
-
const node2 = snapshot(
|
|
12334
|
+
const node2 = snapshot(doc, {
|
|
12325
12335
|
mirror,
|
|
12326
12336
|
blockClass,
|
|
12327
12337
|
blockSelector,
|
|
@@ -12343,7 +12353,7 @@ function record(options = {}) {
|
|
|
12343
12353
|
stylesheetManager.trackLinkElement(n2);
|
|
12344
12354
|
}
|
|
12345
12355
|
if (hasShadowRoot(n2)) {
|
|
12346
|
-
shadowDomManager.addShadowRoot(index.shadowRoot(n2),
|
|
12356
|
+
shadowDomManager.addShadowRoot(index.shadowRoot(n2), doc);
|
|
12347
12357
|
}
|
|
12348
12358
|
},
|
|
12349
12359
|
onIframeLoad: (iframe, childSn) => {
|
|
@@ -12363,7 +12373,7 @@ function record(options = {}) {
|
|
|
12363
12373
|
type: EventType.FullSnapshot,
|
|
12364
12374
|
data: {
|
|
12365
12375
|
node: node2,
|
|
12366
|
-
initialOffset: getWindowScroll(
|
|
12376
|
+
initialOffset: getWindowScroll(win)
|
|
12367
12377
|
}
|
|
12368
12378
|
},
|
|
12369
12379
|
isCheckout
|
|
@@ -12472,6 +12482,7 @@ function record(options = {}) {
|
|
|
12472
12482
|
ignoreSelector,
|
|
12473
12483
|
maskTextClass,
|
|
12474
12484
|
maskTextSelector,
|
|
12485
|
+
ignoreAttribute,
|
|
12475
12486
|
maskInputOptions,
|
|
12476
12487
|
inlineStylesheet,
|
|
12477
12488
|
sampling,
|
|
@@ -12518,7 +12529,7 @@ function record(options = {}) {
|
|
|
12518
12529
|
});
|
|
12519
12530
|
const init = () => {
|
|
12520
12531
|
takeFullSnapshot$1();
|
|
12521
|
-
handlers.push(observe(
|
|
12532
|
+
handlers.push(observe(doc));
|
|
12522
12533
|
recording = true;
|
|
12523
12534
|
};
|
|
12524
12535
|
if (doc.readyState === "interactive" || doc.readyState === "complete") {
|
|
@@ -12543,7 +12554,7 @@ function record(options = {}) {
|
|
|
12543
12554
|
});
|
|
12544
12555
|
if (recordAfter === "load") init();
|
|
12545
12556
|
},
|
|
12546
|
-
|
|
12557
|
+
win
|
|
12547
12558
|
)
|
|
12548
12559
|
);
|
|
12549
12560
|
}
|