source: imaps-frontend/node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js.flow

main
Last change on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 2 weeks ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 420 bytes
Line 
1// @flow
2import { isElement } from './instanceOf';
3import type { Window } from '../types';
4
5export default function getDocumentElement(
6 element: Element | Window
7): HTMLElement {
8 // $FlowFixMe[incompatible-return]: assume body is always available
9 return (
10 (isElement(element)
11 ? element.ownerDocument
12 : // $FlowFixMe[prop-missing]
13 element.document) || window.document
14 ).documentElement;
15}
Note: See TracBrowser for help on using the repository browser.