whoami7 - Manager
:
/
home
/
kckglobal
/
www
/
tp
/
assets
/
libs
/
@popperjs
/
core
/
esm
/
dom-utils
/
Upload File:
files >> //home/kckglobal/www/tp/assets/libs/@popperjs/core/esm/dom-utils/contains.js
import { isShadowRoot } from "./instanceOf.js"; export default function contains(parent, child) { var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method if (parent.contains(child)) { return true; } // then fallback to custom implementation with Shadow DOM support else if (rootNode && isShadowRoot(rootNode)) { var next = child; do { if (next && parent.isSameNode(next)) { return true; } // $FlowFixMe[prop-missing]: need a better way to handle this... next = next.parentNode || next.host; } while (next); } // Give up, the result is false return false; }
Copyright ©2021 || Defacer Indonesia