@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.js
CHANGED
|
@@ -4515,6 +4515,16 @@ function createCache() {
|
|
|
4515
4515
|
stylesWithHoverClass
|
|
4516
4516
|
};
|
|
4517
4517
|
}
|
|
4518
|
+
function safeDocNode(n2, options) {
|
|
4519
|
+
let stringContent = n2.textContent;
|
|
4520
|
+
if (n2.isStyle && options.hackCss) {
|
|
4521
|
+
try {
|
|
4522
|
+
stringContent = adaptCssForReplay(n2.textContent, options.cache);
|
|
4523
|
+
} catch {
|
|
4524
|
+
}
|
|
4525
|
+
}
|
|
4526
|
+
return options.doc.createTextNode(stringContent);
|
|
4527
|
+
}
|
|
4518
4528
|
function buildNode(n2, options) {
|
|
4519
4529
|
var _a2;
|
|
4520
4530
|
const { doc, hackCss, cache } = options;
|
|
@@ -4663,9 +4673,11 @@ function buildNode(n2, options) {
|
|
|
4663
4673
|
return node2;
|
|
4664
4674
|
}
|
|
4665
4675
|
case NodeType$1$1.Text:
|
|
4666
|
-
return
|
|
4667
|
-
|
|
4668
|
-
|
|
4676
|
+
return safeDocNode(n2, {
|
|
4677
|
+
cache,
|
|
4678
|
+
doc,
|
|
4679
|
+
hackCss
|
|
4680
|
+
});
|
|
4669
4681
|
case NodeType$1$1.CDATA:
|
|
4670
4682
|
if (n2.textContent.trim() === "") {
|
|
4671
4683
|
return null;
|