src/polyfills/resources/IntersectionObserverPolyfill.js
function getParentNode(node) {
        var parent = node.parentNode;

        if (parent && parent.nodeType == 11 && parent.host) {
            // If the parent is a shadow root, return the host element.
            return parent.host;
        }
        return parent;
    }
function getParentNode(node) {
        var parent = node.parentNode;

        if (parent && parent.nodeType == 11 && parent.host) {
            // If the parent is a shadow root, return the host element.
            return parent.host;
        }
        return parent;
    }
function getParentNode ( node ) { var parent = node . parentNode ; if ( parent && parent . nodeType == 11 && parent . host ) { // If the parent is a shadow root, return the host element. return parent . host ; } return parent ; }
Gets the parent node of an element or its host element if the parent node
is a shadow root.
@param {Node} node The node whose parent to get.
@return {Node|null} The parent node or null if no parent exists.
Gets the parent node of an element or its host element if the parent node is a shadow root .