@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.
package/dist/rrweb.cjs CHANGED
@@ -240,8 +240,8 @@ function stringifyStylesheet(s2) {
240
240
  return null;
241
241
  }
242
242
  let sheetHref = s2.href;
243
- if (!sheetHref && s2.ownerNode && s2.ownerNode.ownerDocument) {
244
- sheetHref = s2.ownerNode.ownerDocument.baseURI;
243
+ if (!sheetHref && s2.ownerNode) {
244
+ sheetHref = s2.ownerNode.baseURI;
245
245
  }
246
246
  const stringifiedRules = Array.from(
247
247
  rules2,
@@ -5642,6 +5642,12 @@ function buildNodeWithSN(n2, options) {
5642
5642
  } else {
5643
5643
  node2.appendChild(childNode);
5644
5644
  }
5645
+ } else if (n2.type === NodeType$1$1.Document && childN.type === NodeType$1$1.DocumentType) {
5646
+ if (node2.firstChild && node2.firstChild.nodeType === 1) {
5647
+ node2.insertBefore(childNode, node2.firstChild);
5648
+ } else {
5649
+ node2.appendChild(childNode);
5650
+ }
5645
5651
  } else {
5646
5652
  node2.appendChild(childNode);
5647
5653
  }