@posthog/rrweb 0.0.24 → 0.0.25

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.
@@ -284,8 +284,8 @@ function stringifyStylesheet(s2) {
284
284
  return null;
285
285
  }
286
286
  let sheetHref = s2.href;
287
- if (!sheetHref && s2.ownerNode && s2.ownerNode.ownerDocument) {
288
- sheetHref = s2.ownerNode.ownerDocument.baseURI;
287
+ if (!sheetHref && s2.ownerNode) {
288
+ sheetHref = s2.ownerNode.baseURI;
289
289
  }
290
290
  const stringifiedRules = Array.from(
291
291
  rules2,
@@ -5686,6 +5686,12 @@ function buildNodeWithSN(n2, options) {
5686
5686
  } else {
5687
5687
  node2.appendChild(childNode);
5688
5688
  }
5689
+ } else if (n2.type === NodeType$1$1.Document && childN.type === NodeType$1$1.DocumentType) {
5690
+ if (node2.firstChild && node2.firstChild.nodeType === 1) {
5691
+ node2.insertBefore(childNode, node2.firstChild);
5692
+ } else {
5693
+ node2.appendChild(childNode);
5694
+ }
5689
5695
  } else {
5690
5696
  node2.appendChild(childNode);
5691
5697
  }