UNPKG

@material-ui/popper.js

Version:

A fork of popper.js to avoid the deprecation warnings: https://github.com/mui-org/material-ui/issues/19358.

14 lines (13 loc) 315 B
/** * Returns the parentNode or the host of the element * @method * @memberof Popper.Utils * @argument {Element} element * @returns {Element} parent */ export default function getParentNode(element) { if (element.nodeName === 'HTML') { return element; } return element.parentNode || element.host; }