This commit is contained in:
2026-02-10 15:41:06 +08:00
parent 51d772994f
commit 31be7ae4b8
183 changed files with 29172 additions and 9245 deletions
@@ -0,0 +1,14 @@
/**
* Finds the root node (document, shadowDOM root) of the given element
* @method
* @memberof Popper.Utils
* @argument {Element} node
* @returns {Element} root node
*/
export default function getRoot(node) {
if (node.parentNode !== null) {
return getRoot(node.parentNode);
}
return node;
}