@posthog/rrweb-snapshot 0.0.23 → 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.
@@ -280,8 +280,8 @@ function stringifyStylesheet(s) {
280
280
  return null;
281
281
  }
282
282
  let sheetHref = s.href;
283
- if (!sheetHref && s.ownerNode && s.ownerNode.ownerDocument) {
284
- sheetHref = s.ownerNode.ownerDocument.baseURI;
283
+ if (!sheetHref && s.ownerNode) {
284
+ sheetHref = s.ownerNode.baseURI;
285
285
  }
286
286
  const stringifiedRules = Array.from(
287
287
  rules,
@@ -5703,6 +5703,12 @@ function buildNodeWithSN(n, options) {
5703
5703
  } else {
5704
5704
  node2.appendChild(childNode);
5705
5705
  }
5706
+ } else if (n.type === NodeType$1.Document && childN.type === NodeType$1.DocumentType) {
5707
+ if (node2.firstChild && node2.firstChild.nodeType === 1) {
5708
+ node2.insertBefore(childNode, node2.firstChild);
5709
+ } else {
5710
+ node2.appendChild(childNode);
5711
+ }
5706
5712
  } else {
5707
5713
  node2.appendChild(childNode);
5708
5714
  }