OWL ITS + 탐지시스템(인터넷 진흥원)
이민희
2021-12-05 8cce4cc44cd2048ec1630b29e8384ed0703e7202
1
2
3
4
5
6
7
8
9
10
11
12
13
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;
}