@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.
@@ -460,6 +460,14 @@ const index = {
460
460
  patch
461
461
  };
462
462
  const shouldTryAnonymousFetchingOnCorsError$1 = () => {
463
+ try {
464
+ console.log(
465
+ "window._rrweb_skip_re_fetching_to_suppress_cors_errors",
466
+ //@ts-expect-error
467
+ window._rrweb_skip_re_fetching_to_suppress_cors_errors
468
+ );
469
+ } catch (err) {
470
+ }
463
471
  return !("_rrweb_skip_re_fetching_to_suppress_cors_errors" in window && window._rrweb_skip_re_fetching_to_suppress_cors_errors === true);
464
472
  };
465
473
  function isElement(n2) {
@@ -1531,7 +1539,9 @@ function serializeElementNode(n2, options) {
1531
1539
  const imageSrc = (image.currentSrc || image.getAttribute("src") || "<unknown-src>") + "";
1532
1540
  const imageHeight = image.naturalHeight;
1533
1541
  const imageWidth = image.naturalWidth;
1542
+ console.log("handling inline image", image, imageSrc);
1534
1543
  const inlineImageCleanup = () => {
1544
+ console.log("cleaning up", imageSrc);
1535
1545
  overrideImage = null;
1536
1546
  };
1537
1547
  const recordInlineImage = () => {
@@ -1545,8 +1555,11 @@ function serializeElementNode(n2, options) {
1545
1555
  dataURLOptions.quality
1546
1556
  );
1547
1557
  } catch (err) {
1558
+ console.log("detected inline image error", err, imageSrc);
1548
1559
  if (image.crossOrigin !== "anonymous") {
1560
+ console.log("crossOrigin is not anonymous", imageSrc);
1549
1561
  if (shouldTryAnonymousFetchingOnCorsError$1()) {
1562
+ console.log("overriding image", imageSrc);
1550
1563
  overrideImage = new Image();
1551
1564
  overrideImage.src = imageSrc;
1552
1565
  overrideImage.crossOrigin = "anonymous";
@@ -5622,6 +5635,14 @@ var __defProp222 = Object.defineProperty;
5622
5635
  var __defNormalProp222 = (obj, key, value) => key in obj ? __defProp222(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5623
5636
  var __publicField22 = (obj, key, value) => __defNormalProp222(obj, typeof key !== "symbol" ? key + "" : key, value);
5624
5637
  const shouldTryAnonymousFetchingOnCorsError = () => {
5638
+ try {
5639
+ console.log(
5640
+ "window._rrweb_skip_re_fetching_to_suppress_cors_errors",
5641
+ //@ts-expect-error
5642
+ window._rrweb_skip_re_fetching_to_suppress_cors_errors
5643
+ );
5644
+ } catch (err) {
5645
+ }
5625
5646
  return !("_rrweb_skip_re_fetching_to_suppress_cors_errors" in window && window._rrweb_skip_re_fetching_to_suppress_cors_errors === true);
5626
5647
  };
5627
5648
  function fixBrowserCompatibilityIssuesInCSS(cssText) {