/**
 * Returns the document that owns `node`, falling back to the ambient
 * `document` global when `node` is null or detached. Use this instead of
 * reading `document` directly so realm-sensitive checks (e.g. `instanceof`)
 * work correctly across iframes.
 */
export function ownerDocument(node) {
  return node?.ownerDocument ?? document;
}
//# sourceMappingURL=owner-document.jsx.map
