@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
package/dist/rrweb-record.cjs
CHANGED
|
@@ -239,9 +239,13 @@ function stringifyStylesheet(s2) {
|
|
|
239
239
|
if (!rules2) {
|
|
240
240
|
return null;
|
|
241
241
|
}
|
|
242
|
+
let sheetHref = s2.href;
|
|
243
|
+
if (!sheetHref && s2.ownerNode && s2.ownerNode.ownerDocument) {
|
|
244
|
+
sheetHref = s2.ownerNode.ownerDocument.baseURI;
|
|
245
|
+
}
|
|
242
246
|
const stringifiedRules = Array.from(
|
|
243
247
|
rules2,
|
|
244
|
-
(rule2) => stringifyRule(rule2,
|
|
248
|
+
(rule2) => stringifyRule(rule2, sheetHref)
|
|
245
249
|
).join("");
|
|
246
250
|
return fixBrowserCompatibilityIssuesInCSS(stringifiedRules);
|
|
247
251
|
} catch (error) {
|
|
@@ -249,6 +253,7 @@ function stringifyStylesheet(s2) {
|
|
|
249
253
|
}
|
|
250
254
|
}
|
|
251
255
|
function stringifyRule(rule2, sheetHref) {
|
|
256
|
+
var _a2;
|
|
252
257
|
if (isCSSImportRule(rule2)) {
|
|
253
258
|
let importStringified;
|
|
254
259
|
try {
|
|
@@ -259,8 +264,11 @@ function stringifyRule(rule2, sheetHref) {
|
|
|
259
264
|
} catch (error) {
|
|
260
265
|
importStringified = rule2.cssText;
|
|
261
266
|
}
|
|
262
|
-
|
|
263
|
-
|
|
267
|
+
try {
|
|
268
|
+
if (importStringified && ((_a2 = rule2.styleSheet) == null ? void 0 : _a2.href)) {
|
|
269
|
+
return absolutifyURLs(importStringified, rule2.styleSheet.href);
|
|
270
|
+
}
|
|
271
|
+
} catch {
|
|
264
272
|
}
|
|
265
273
|
return importStringified;
|
|
266
274
|
} else {
|