UNPKG

@patternfly/react-core

Version:

This library provides a set of common React components for use with the PatternFly reference implementation.

12 lines (10 loc) 345 B
// @ts-nocheck import { isElement } from './instanceOf'; import { Window } from '../types'; /** * @param element */ export default function getDocumentElement(element: Element | Window): HTMLElement { // $FlowFixMe: assume body is always available return (isElement(element) ? element.ownerDocument : element.document).documentElement; }