src/IntersectionObservation.js
function isDetached(container, target) {
    const docElement = document.documentElement;

    return (
        container !== docElement && !docElement.contains(container) ||
        !container.contains(target)
    );
}
function isDetached(container, target) {
    const docElement = document.documentElement;

    return (
        container !== docElement && !docElement.contains(container) ||
        !container.contains(target)
    );
}
function isDetached ( container , target ) { const docElement = document . documentElement ; return ( container !== docElement && ! docElement . contains ( container ) || ! container . contains ( target ) ) ; }
Tells whether target is a descendant of container element
and that both of them are present in DOM.

@param {Element} container - Container element.
@param {Element} target - Target element.
@returns {Boolean}
Tells whether target is a descendant of container element and that both of them are present in DOM .