vendor: 677 bytes, lines 1-23
1import { isShadowRoot } from "./instanceOf.js"; 2export default function contains(parent, child) { 3 var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method 4 5 if (parent.contains(child)) { 6 return true; 7 } // then fallback to custom implementation with Shadow DOM support 8 else if (rootNode && isShadowRoot(rootNode)) { 9 var next = child; 10 11 do { 12 if (next && parent.isSameNode(next)) { 13 return true; 14 } // $FlowFixMe[prop-missing]: need a better way to handle this... 15 16 17 next = next.parentNode || next.host; 18 } while (next); 19 } // Give up, the result is false 20 21 22 return false; 23}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.