Welcome to mirror list, hosted at ThFree Co, Russian Federation.

getDocumentElement.js « dom-utils « esm « dist « package « popperjs - github.com/gohugoio/hugo-mod-jslibs-dist.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c01240bb266039bcfbbc4246c0c9a4e88fbbc01e (plain)
1
2
3
4
5
6
import { isElement } from "./instanceOf.js";
export default function getDocumentElement(element) {
  // $FlowFixMe[incompatible-return]: assume body is always available
  return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]
  element.document) || window.document).documentElement;
}