@posthog/rrweb-record 0.0.20 → 0.0.21
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 +11 -3
- package/dist/rrweb-record.cjs.map +1 -1
- package/dist/rrweb-record.js +11 -3
- package/dist/rrweb-record.js.map +1 -1
- package/dist/rrweb-record.umd.cjs +11 -3
- package/dist/rrweb-record.umd.cjs.map +2 -2
- package/dist/rrweb-record.umd.min.cjs +10 -10
- package/dist/rrweb-record.umd.min.cjs.map +3 -3
- package/package.json +1 -1
|
@@ -283,9 +283,13 @@ function stringifyStylesheet(s2) {
|
|
|
283
283
|
if (!rules2) {
|
|
284
284
|
return null;
|
|
285
285
|
}
|
|
286
|
+
let sheetHref = s2.href;
|
|
287
|
+
if (!sheetHref && s2.ownerNode && s2.ownerNode.ownerDocument) {
|
|
288
|
+
sheetHref = s2.ownerNode.ownerDocument.baseURI;
|
|
289
|
+
}
|
|
286
290
|
const stringifiedRules = Array.from(
|
|
287
291
|
rules2,
|
|
288
|
-
(rule2) => stringifyRule(rule2,
|
|
292
|
+
(rule2) => stringifyRule(rule2, sheetHref)
|
|
289
293
|
).join("");
|
|
290
294
|
return fixBrowserCompatibilityIssuesInCSS(stringifiedRules);
|
|
291
295
|
} catch (error) {
|
|
@@ -293,6 +297,7 @@ function stringifyStylesheet(s2) {
|
|
|
293
297
|
}
|
|
294
298
|
}
|
|
295
299
|
function stringifyRule(rule2, sheetHref) {
|
|
300
|
+
var _a2;
|
|
296
301
|
if (isCSSImportRule(rule2)) {
|
|
297
302
|
let importStringified;
|
|
298
303
|
try {
|
|
@@ -303,8 +308,11 @@ function stringifyRule(rule2, sheetHref) {
|
|
|
303
308
|
} catch (error) {
|
|
304
309
|
importStringified = rule2.cssText;
|
|
305
310
|
}
|
|
306
|
-
|
|
307
|
-
|
|
311
|
+
try {
|
|
312
|
+
if (importStringified && ((_a2 = rule2.styleSheet) == null ? void 0 : _a2.href)) {
|
|
313
|
+
return absolutifyURLs(importStringified, rule2.styleSheet.href);
|
|
314
|
+
}
|
|
315
|
+
} catch (e) {
|
|
308
316
|
}
|
|
309
317
|
return importStringified;
|
|
310
318
|
} else {
|