@posthog/rrweb-player 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-player.cjs +15 -3
- package/dist/rrweb-player.cjs.map +1 -1
- package/dist/rrweb-player.js +15 -3
- package/dist/rrweb-player.js.map +1 -1
- package/dist/rrweb-player.umd.cjs +15 -3
- package/dist/rrweb-player.umd.cjs.map +2 -2
- package/dist/rrweb-player.umd.min.cjs +27 -27
- package/dist/rrweb-player.umd.min.cjs.map +3 -3
- package/package.json +1 -1
package/dist/rrweb-player.cjs
CHANGED
|
@@ -4517,6 +4517,16 @@ function createCache() {
|
|
|
4517
4517
|
stylesWithHoverClass
|
|
4518
4518
|
};
|
|
4519
4519
|
}
|
|
4520
|
+
function safeDocNode(n2, options) {
|
|
4521
|
+
let stringContent = n2.textContent;
|
|
4522
|
+
if (n2.isStyle && options.hackCss) {
|
|
4523
|
+
try {
|
|
4524
|
+
stringContent = adaptCssForReplay(n2.textContent, options.cache);
|
|
4525
|
+
} catch {
|
|
4526
|
+
}
|
|
4527
|
+
}
|
|
4528
|
+
return options.doc.createTextNode(stringContent);
|
|
4529
|
+
}
|
|
4520
4530
|
function buildNode(n2, options) {
|
|
4521
4531
|
var _a2;
|
|
4522
4532
|
const { doc, hackCss, cache } = options;
|
|
@@ -4665,9 +4675,11 @@ function buildNode(n2, options) {
|
|
|
4665
4675
|
return node2;
|
|
4666
4676
|
}
|
|
4667
4677
|
case NodeType$1$1.Text:
|
|
4668
|
-
return
|
|
4669
|
-
|
|
4670
|
-
|
|
4678
|
+
return safeDocNode(n2, {
|
|
4679
|
+
cache,
|
|
4680
|
+
doc,
|
|
4681
|
+
hackCss
|
|
4682
|
+
});
|
|
4671
4683
|
case NodeType$1$1.CDATA:
|
|
4672
4684
|
if (n2.textContent.trim() === "") {
|
|
4673
4685
|
return null;
|