@glimt/record 0.0.51 → 0.0.52
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/record.cjs +21 -0
- package/dist/record.cjs.map +1 -1
- package/dist/record.js +21 -0
- package/dist/record.js.map +1 -1
- package/dist/record.umd.cjs +21 -0
- package/dist/record.umd.cjs.map +2 -2
- package/dist/record.umd.min.cjs +22 -22
- package/dist/record.umd.min.cjs.map +3 -3
- package/package.json +1 -1
package/dist/record.cjs
CHANGED
|
@@ -428,6 +428,14 @@ const index = {
|
|
|
428
428
|
patch
|
|
429
429
|
};
|
|
430
430
|
const shouldTryAnonymousFetchingOnCorsError$1 = () => {
|
|
431
|
+
try {
|
|
432
|
+
console.log(
|
|
433
|
+
"window._rrweb_skip_re_fetching_to_suppress_cors_errors",
|
|
434
|
+
//@ts-expect-error
|
|
435
|
+
window._rrweb_skip_re_fetching_to_suppress_cors_errors
|
|
436
|
+
);
|
|
437
|
+
} catch (err) {
|
|
438
|
+
}
|
|
431
439
|
return !("_rrweb_skip_re_fetching_to_suppress_cors_errors" in window && window._rrweb_skip_re_fetching_to_suppress_cors_errors === true);
|
|
432
440
|
};
|
|
433
441
|
function isElement(n2) {
|
|
@@ -1498,7 +1506,9 @@ function serializeElementNode(n2, options) {
|
|
|
1498
1506
|
const imageSrc = (image.currentSrc || image.getAttribute("src") || "<unknown-src>") + "";
|
|
1499
1507
|
const imageHeight = image.naturalHeight;
|
|
1500
1508
|
const imageWidth = image.naturalWidth;
|
|
1509
|
+
console.log("handling inline image", image, imageSrc);
|
|
1501
1510
|
const inlineImageCleanup = () => {
|
|
1511
|
+
console.log("cleaning up", imageSrc);
|
|
1502
1512
|
overrideImage = null;
|
|
1503
1513
|
};
|
|
1504
1514
|
const recordInlineImage = () => {
|
|
@@ -1512,8 +1522,11 @@ function serializeElementNode(n2, options) {
|
|
|
1512
1522
|
dataURLOptions.quality
|
|
1513
1523
|
);
|
|
1514
1524
|
} catch (err) {
|
|
1525
|
+
console.log("detected inline image error", err, imageSrc);
|
|
1515
1526
|
if (image.crossOrigin !== "anonymous") {
|
|
1527
|
+
console.log("crossOrigin is not anonymous", imageSrc);
|
|
1516
1528
|
if (shouldTryAnonymousFetchingOnCorsError$1()) {
|
|
1529
|
+
console.log("overriding image", imageSrc);
|
|
1517
1530
|
overrideImage = new Image();
|
|
1518
1531
|
overrideImage.src = imageSrc;
|
|
1519
1532
|
overrideImage.crossOrigin = "anonymous";
|
|
@@ -5585,6 +5598,14 @@ var __defProp22 = Object.defineProperty;
|
|
|
5585
5598
|
var __defNormalProp22 = (obj, key, value) => key in obj ? __defProp22(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5586
5599
|
var __publicField22 = (obj, key, value) => __defNormalProp22(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5587
5600
|
const shouldTryAnonymousFetchingOnCorsError = () => {
|
|
5601
|
+
try {
|
|
5602
|
+
console.log(
|
|
5603
|
+
"window._rrweb_skip_re_fetching_to_suppress_cors_errors",
|
|
5604
|
+
//@ts-expect-error
|
|
5605
|
+
window._rrweb_skip_re_fetching_to_suppress_cors_errors
|
|
5606
|
+
);
|
|
5607
|
+
} catch (err) {
|
|
5608
|
+
}
|
|
5588
5609
|
return !("_rrweb_skip_re_fetching_to_suppress_cors_errors" in window && window._rrweb_skip_re_fetching_to_suppress_cors_errors === true);
|
|
5589
5610
|
};
|
|
5590
5611
|
function fixBrowserCompatibilityIssuesInCSS(cssText) {
|