UNPKG

react-aria

Version:
22 lines (19 loc) 1.02 kB
const $d447af545b77c9f1$export$b204af158042fbac = (el)=>{ return el?.ownerDocument ?? document; }; const $d447af545b77c9f1$export$f21a1ffae260145a = (el)=>{ if (el && 'window' in el && el.window === el) return el; const doc = $d447af545b77c9f1$export$b204af158042fbac(el); return doc.defaultView || window; }; /** * Type guard that checks if a value is a Node. Verifies the presence and type of the nodeType * property. */ function $d447af545b77c9f1$var$isNode(value) { return value !== null && typeof value === 'object' && 'nodeType' in value && typeof value.nodeType === 'number'; } function $d447af545b77c9f1$export$af51f0f06c0f328a(node) { return $d447af545b77c9f1$var$isNode(node) && node.nodeType === Node.DOCUMENT_FRAGMENT_NODE && 'host' in node; } export {$d447af545b77c9f1$export$b204af158042fbac as getOwnerDocument, $d447af545b77c9f1$export$f21a1ffae260145a as getOwnerWindow, $d447af545b77c9f1$export$af51f0f06c0f328a as isShadowRoot}; //# sourceMappingURL=domHelpers.mjs.map