import { isElement } from './instanceOf.mjs';

function getDocumentElement(element) {
  // $FlowFixMe[incompatible-return]: assume body is always available
  return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]
  element.document) || window.document).documentElement;
}

export { getDocumentElement as default };
//# sourceMappingURL=getDocumentElement.mjs.map
