@glimt/record 0.0.54 → 0.0.56
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/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/record.cjs +11 -22
- package/dist/record.cjs.map +1 -1
- package/dist/record.js +11 -22
- package/dist/record.js.map +1 -1
- package/dist/record.umd.cjs +11 -22
- package/dist/record.umd.cjs.map +2 -2
- package/dist/record.umd.min.cjs +24 -24
- package/dist/record.umd.min.cjs.map +3 -3
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/record.cjs
CHANGED
|
@@ -430,9 +430,6 @@ const index = {
|
|
|
430
430
|
const shouldTryAnonymousFetchingOnCorsError$1 = () => {
|
|
431
431
|
return !("_rrweb_skip_re_fetching_to_suppress_cors_errors" in window && window._rrweb_skip_re_fetching_to_suppress_cors_errors === true);
|
|
432
432
|
};
|
|
433
|
-
const isDebug$1 = () => {
|
|
434
|
-
return "_rrweb_is_debug" in window && window._rrweb_is_debug ? window._rrweb_is_debug : false;
|
|
435
|
-
};
|
|
436
433
|
function isElement(n2) {
|
|
437
434
|
return n2.nodeType === n2.ELEMENT_NODE;
|
|
438
435
|
}
|
|
@@ -1498,6 +1495,7 @@ function serializeElementNode(n2, options) {
|
|
|
1498
1495
|
}
|
|
1499
1496
|
const image = n2;
|
|
1500
1497
|
let overrideImage = null;
|
|
1498
|
+
let calls = 0;
|
|
1501
1499
|
const imageSrc = (image.currentSrc || image.getAttribute("src") || "<unknown-src>") + "";
|
|
1502
1500
|
const imageHeight = image.naturalHeight;
|
|
1503
1501
|
const imageWidth = image.naturalWidth;
|
|
@@ -1505,6 +1503,8 @@ function serializeElementNode(n2, options) {
|
|
|
1505
1503
|
overrideImage = null;
|
|
1506
1504
|
};
|
|
1507
1505
|
const recordInlineImage = () => {
|
|
1506
|
+
calls++;
|
|
1507
|
+
if (calls > 3) return;
|
|
1508
1508
|
(overrideImage ?? image).removeEventListener("error", onImageLoadError);
|
|
1509
1509
|
try {
|
|
1510
1510
|
canvasService.width = imageWidth;
|
|
@@ -1535,10 +1535,9 @@ function serializeElementNode(n2, options) {
|
|
|
1535
1535
|
return;
|
|
1536
1536
|
}
|
|
1537
1537
|
} else {
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
);
|
|
1538
|
+
console.warn(
|
|
1539
|
+
`Cannot inline img src=${imageSrc}! Error: ${err}`
|
|
1540
|
+
);
|
|
1542
1541
|
}
|
|
1543
1542
|
}
|
|
1544
1543
|
inlineImageCleanup();
|
|
@@ -1694,7 +1693,7 @@ function serializeNodeWithId(n2, options) {
|
|
|
1694
1693
|
cssCaptured
|
|
1695
1694
|
});
|
|
1696
1695
|
if (!_serializedNode) {
|
|
1697
|
-
|
|
1696
|
+
console.warn(n2, "not serialized");
|
|
1698
1697
|
return null;
|
|
1699
1698
|
}
|
|
1700
1699
|
let id;
|
|
@@ -12676,9 +12675,6 @@ class StylesheetManager {
|
|
|
12676
12675
|
trackStylesheetInLinkElement(_linkEl) {
|
|
12677
12676
|
}
|
|
12678
12677
|
}
|
|
12679
|
-
const isDebug = () => {
|
|
12680
|
-
return "_rrweb_is_debug" in window && window._rrweb_is_debug ? window._rrweb_is_debug : false;
|
|
12681
|
-
};
|
|
12682
12678
|
let wrappedEmit;
|
|
12683
12679
|
let takeFullSnapshot$1;
|
|
12684
12680
|
let canvasManager;
|
|
@@ -12691,7 +12687,7 @@ try {
|
|
|
12691
12687
|
document.body.removeChild(cleanFrame);
|
|
12692
12688
|
}
|
|
12693
12689
|
} catch (err) {
|
|
12694
|
-
|
|
12690
|
+
console.debug("Unable to override Array.from", err);
|
|
12695
12691
|
}
|
|
12696
12692
|
const mirror = createMirror$2();
|
|
12697
12693
|
function record(options = {}) {
|
|
@@ -12970,8 +12966,7 @@ function record(options = {}) {
|
|
|
12970
12966
|
keepIframeSrcFn
|
|
12971
12967
|
});
|
|
12972
12968
|
if (!node2) {
|
|
12973
|
-
|
|
12974
|
-
return;
|
|
12969
|
+
return console.warn("Failed to snapshot the document");
|
|
12975
12970
|
}
|
|
12976
12971
|
wrappedEmit(
|
|
12977
12972
|
{
|
|
@@ -13119,10 +13114,7 @@ function record(options = {}) {
|
|
|
13119
13114
|
try {
|
|
13120
13115
|
handlers.push(observe(iframeEl.contentDocument));
|
|
13121
13116
|
} catch (error) {
|
|
13122
|
-
|
|
13123
|
-
console.warn("internal error");
|
|
13124
|
-
console.warn(error);
|
|
13125
|
-
}
|
|
13117
|
+
console.warn(error);
|
|
13126
13118
|
}
|
|
13127
13119
|
});
|
|
13128
13120
|
let initedAt = null;
|
|
@@ -13181,10 +13173,7 @@ function record(options = {}) {
|
|
|
13181
13173
|
unregisterErrorHandler();
|
|
13182
13174
|
};
|
|
13183
13175
|
} catch (error) {
|
|
13184
|
-
|
|
13185
|
-
console.warn("internal error1");
|
|
13186
|
-
console.warn(error);
|
|
13187
|
-
}
|
|
13176
|
+
console.warn(error);
|
|
13188
13177
|
}
|
|
13189
13178
|
}
|
|
13190
13179
|
record.addCustomEvent = (tag, payload) => {
|