@appsurify-testmap/rrweb-all 2.1.0-alpha.1 → 2.1.0-alpha.3
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-all.cjs +28 -10
- package/dist/rrweb-all.cjs.map +1 -1
- package/dist/rrweb-all.js +28 -10
- package/dist/rrweb-all.js.map +1 -1
- package/dist/rrweb-all.umd.cjs +27 -10
- package/dist/rrweb-all.umd.cjs.map +2 -2
- package/dist/rrweb-all.umd.min.cjs +24 -24
- package/dist/rrweb-all.umd.min.cjs.map +3 -3
- package/package.json +4 -4
package/dist/rrweb-all.cjs
CHANGED
|
@@ -915,6 +915,10 @@ function cleanAttributes(doc, element, ignoreAttribute) {
|
|
|
915
915
|
}
|
|
916
916
|
return attributes;
|
|
917
917
|
}
|
|
918
|
+
function shouldIgnoreAttribute(ignore, name) {
|
|
919
|
+
if (!ignore) return false;
|
|
920
|
+
return typeof ignore === "string" ? name === ignore : ignore.test(name);
|
|
921
|
+
}
|
|
918
922
|
function _isBlockedElement(element, blockClass, blockSelector) {
|
|
919
923
|
try {
|
|
920
924
|
if (typeof blockClass === "string") {
|
|
@@ -1641,7 +1645,6 @@ function snapshot(n2, options) {
|
|
|
1641
1645
|
stylesheetLoadTimeout,
|
|
1642
1646
|
keepIframeSrcFn = () => false
|
|
1643
1647
|
} = options || {};
|
|
1644
|
-
console.debug(`${Date.now()} [rrweb-snapshot] snapshot:options:`, options);
|
|
1645
1648
|
const maskInputOptions = maskAllInputs === true ? {
|
|
1646
1649
|
color: true,
|
|
1647
1650
|
date: true,
|
|
@@ -10920,9 +10923,8 @@ function hookSetter(target, key, d, isRevoked, win = window) {
|
|
|
10920
10923
|
);
|
|
10921
10924
|
return () => hookSetter(target, key, original || {}, true);
|
|
10922
10925
|
}
|
|
10923
|
-
|
|
10924
|
-
|
|
10925
|
-
nowTimestamp = () => (/* @__PURE__ */ new Date()).getTime();
|
|
10926
|
+
function nowTimestamp() {
|
|
10927
|
+
return performance.timeOrigin + performance.now();
|
|
10926
10928
|
}
|
|
10927
10929
|
function getWindowScroll(win = window) {
|
|
10928
10930
|
var _a2, _b2, _c, _d;
|
|
@@ -11203,9 +11205,7 @@ const utils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
|
|
|
11203
11205
|
isSerializedStylesheet,
|
|
11204
11206
|
iterateResolveTree,
|
|
11205
11207
|
legacy_isTouchEvent,
|
|
11206
|
-
|
|
11207
|
-
return nowTimestamp;
|
|
11208
|
-
},
|
|
11208
|
+
nowTimestamp,
|
|
11209
11209
|
on,
|
|
11210
11210
|
polyfill: polyfill$1,
|
|
11211
11211
|
queueToResolveTrees,
|
|
@@ -11591,6 +11591,21 @@ class MutationBuffer {
|
|
|
11591
11591
|
};
|
|
11592
11592
|
}).filter((text) => !addedIds.has(text.id)).filter((text) => this.mirror.has(text.id)),
|
|
11593
11593
|
attributes: this.attributes.map((attribute) => {
|
|
11594
|
+
const element = attribute.node;
|
|
11595
|
+
const filtered = {};
|
|
11596
|
+
for (const [name, value] of Object.entries(attribute.attributes)) {
|
|
11597
|
+
const isIgnored2 = shouldIgnoreAttribute(this.ignoreAttribute, name);
|
|
11598
|
+
const existedBefore = element.hasAttribute(name);
|
|
11599
|
+
const keep = value !== null && !isIgnored2 || value === null && (!isIgnored2 || attribute.attributes[name] !== null || existedBefore);
|
|
11600
|
+
if (keep) {
|
|
11601
|
+
filtered[name] = value;
|
|
11602
|
+
}
|
|
11603
|
+
}
|
|
11604
|
+
return {
|
|
11605
|
+
...attribute,
|
|
11606
|
+
attributes: filtered
|
|
11607
|
+
};
|
|
11608
|
+
}).filter((attribute) => Object.keys(attribute.attributes).length > 0).map((attribute) => {
|
|
11594
11609
|
const { attributes } = attribute;
|
|
11595
11610
|
if (typeof attributes.style === "string") {
|
|
11596
11611
|
const diffAsStr = JSON.stringify(attribute.styleDiff);
|
|
@@ -11672,7 +11687,10 @@ class MutationBuffer {
|
|
|
11672
11687
|
case "attributes": {
|
|
11673
11688
|
const target = m.target;
|
|
11674
11689
|
let attributeName = m.attributeName;
|
|
11675
|
-
let value =
|
|
11690
|
+
let value = target.getAttribute(attributeName);
|
|
11691
|
+
if (value === null && m.oldValue === null) {
|
|
11692
|
+
return;
|
|
11693
|
+
}
|
|
11676
11694
|
if (attributeName === "value") {
|
|
11677
11695
|
const type = getInputType(target);
|
|
11678
11696
|
value = maskInputValue({
|
|
@@ -11708,7 +11726,8 @@ class MutationBuffer {
|
|
|
11708
11726
|
if (attributeName === "type" && target.tagName === "INPUT" && (m.oldValue || "").toLowerCase() === "password") {
|
|
11709
11727
|
target.setAttribute("data-rr-is-password", "true");
|
|
11710
11728
|
}
|
|
11711
|
-
if (!isIgnoreAttribute(target.tagName, attributeName)
|
|
11729
|
+
if (!isIgnoreAttribute(target.tagName, attributeName) && // eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
|
11730
|
+
!shouldIgnoreAttribute(this.ignoreAttribute, attributeName)) {
|
|
11712
11731
|
item.attributes[attributeName] = transformAttribute(
|
|
11713
11732
|
this.doc,
|
|
11714
11733
|
toLowerCase(target.tagName),
|
|
@@ -14102,7 +14121,6 @@ function record(options = {}) {
|
|
|
14102
14121
|
ignoreCSSAttributes = /* @__PURE__ */ new Set([]),
|
|
14103
14122
|
errorHandler: errorHandler2
|
|
14104
14123
|
} = options;
|
|
14105
|
-
console.debug(`${Date.now()} [rrweb] record:options:`, options);
|
|
14106
14124
|
registerErrorHandler(errorHandler2);
|
|
14107
14125
|
const inEmittingFrame = recordCrossOriginIframes ? window.parent === window : true;
|
|
14108
14126
|
let passEmitsToParent = false;
|