@glimt/record 0.0.42 → 0.0.43
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/record.cjs +20 -8
- package/dist/record.cjs.map +1 -1
- package/dist/record.js +20 -8
- package/dist/record.js.map +1 -1
- package/dist/record.umd.cjs +20 -8
- package/dist/record.umd.cjs.map +2 -2
- package/dist/record.umd.min.cjs +14 -14
- package/dist/record.umd.min.cjs.map +3 -3
- package/package.json +1 -1
package/dist/record.cjs
CHANGED
|
@@ -812,7 +812,7 @@ function splitCssText(cssText, style, _testNoPxNorm = false) {
|
|
|
812
812
|
function markCssSplits(cssText, style) {
|
|
813
813
|
return splitCssText(cssText, style).join("/* rr_split */");
|
|
814
814
|
}
|
|
815
|
-
const CLEANUP_DEBOUNCE_TIME$1 = 1e3 * 60 *
|
|
815
|
+
const CLEANUP_DEBOUNCE_TIME$1 = 1e3 * 60 * 2;
|
|
816
816
|
const _AsyncStylesheetManager$1 = class _AsyncStylesheetManager {
|
|
817
817
|
constructor() {
|
|
818
818
|
__publicField$1(this, "currentHref", null);
|
|
@@ -823,7 +823,11 @@ const _AsyncStylesheetManager$1 = class _AsyncStylesheetManager {
|
|
|
823
823
|
}
|
|
824
824
|
removeCloneNode(href) {
|
|
825
825
|
if (!(href in this.clones) || this.clones[href] === void 0) return;
|
|
826
|
-
document.
|
|
826
|
+
const clone = document.querySelector(
|
|
827
|
+
`link[data-rrweb-link-cloned="${this.clones[href].cloneNodeAttrId}"]`
|
|
828
|
+
);
|
|
829
|
+
if (!clone) return;
|
|
830
|
+
document.head.removeChild(clone);
|
|
827
831
|
}
|
|
828
832
|
onLoad(href) {
|
|
829
833
|
if (!(href in this.clones) || this.clones[href] === void 0) return;
|
|
@@ -895,14 +899,16 @@ const _AsyncStylesheetManager$1 = class _AsyncStylesheetManager {
|
|
|
895
899
|
href
|
|
896
900
|
);
|
|
897
901
|
const clone = forElement.cloneNode();
|
|
902
|
+
const cloneNodeAttrId = Math.random().toString(36).slice(2);
|
|
898
903
|
clone.setAttribute("crossorigin", "anonymous");
|
|
899
|
-
clone.setAttribute("data-rrweb-link-cloned",
|
|
904
|
+
clone.setAttribute("data-rrweb-link-cloned", cloneNodeAttrId);
|
|
900
905
|
document.head.appendChild(clone);
|
|
901
906
|
this.clones[href] = {
|
|
902
907
|
original: forElement,
|
|
903
908
|
clone,
|
|
904
909
|
loaded: false,
|
|
905
|
-
cssText: null
|
|
910
|
+
cssText: null,
|
|
911
|
+
cloneNodeAttrId
|
|
906
912
|
};
|
|
907
913
|
clone.onload = () => {
|
|
908
914
|
this.onLoad(href);
|
|
@@ -5629,7 +5635,7 @@ function absolutifyURLs(cssText, href) {
|
|
|
5629
5635
|
}
|
|
5630
5636
|
);
|
|
5631
5637
|
}
|
|
5632
|
-
const CLEANUP_DEBOUNCE_TIME = 1e3 * 60 *
|
|
5638
|
+
const CLEANUP_DEBOUNCE_TIME = 1e3 * 60 * 2;
|
|
5633
5639
|
const _AsyncStylesheetManager2 = class _AsyncStylesheetManager22 {
|
|
5634
5640
|
constructor() {
|
|
5635
5641
|
__publicField22(this, "currentHref", null);
|
|
@@ -5640,7 +5646,11 @@ const _AsyncStylesheetManager2 = class _AsyncStylesheetManager22 {
|
|
|
5640
5646
|
}
|
|
5641
5647
|
removeCloneNode(href) {
|
|
5642
5648
|
if (!(href in this.clones) || this.clones[href] === void 0) return;
|
|
5643
|
-
document.
|
|
5649
|
+
const clone = document.querySelector(
|
|
5650
|
+
`link[data-rrweb-link-cloned="${this.clones[href].cloneNodeAttrId}"]`
|
|
5651
|
+
);
|
|
5652
|
+
if (!clone) return;
|
|
5653
|
+
document.head.removeChild(clone);
|
|
5644
5654
|
}
|
|
5645
5655
|
onLoad(href) {
|
|
5646
5656
|
if (!(href in this.clones) || this.clones[href] === void 0) return;
|
|
@@ -5712,14 +5722,16 @@ const _AsyncStylesheetManager2 = class _AsyncStylesheetManager22 {
|
|
|
5712
5722
|
href
|
|
5713
5723
|
);
|
|
5714
5724
|
const clone = forElement.cloneNode();
|
|
5725
|
+
const cloneNodeAttrId = Math.random().toString(36).slice(2);
|
|
5715
5726
|
clone.setAttribute("crossorigin", "anonymous");
|
|
5716
|
-
clone.setAttribute("data-rrweb-link-cloned",
|
|
5727
|
+
clone.setAttribute("data-rrweb-link-cloned", cloneNodeAttrId);
|
|
5717
5728
|
document.head.appendChild(clone);
|
|
5718
5729
|
this.clones[href] = {
|
|
5719
5730
|
original: forElement,
|
|
5720
5731
|
clone,
|
|
5721
5732
|
loaded: false,
|
|
5722
|
-
cssText: null
|
|
5733
|
+
cssText: null,
|
|
5734
|
+
cloneNodeAttrId
|
|
5723
5735
|
};
|
|
5724
5736
|
clone.onload = () => {
|
|
5725
5737
|
this.onLoad(href);
|