| 23659 | */ parcelHelpers.export(exports, "elementContains", ()=>elementContains); |
| 23660 | var _getParent = require("./getParent"); |
| 23661 | function elementContains(parent, child, allowVirtualParents) { |
| 23662 | if (allowVirtualParents === void 0) allowVirtualParents = true; |
| 23663 | var isContained = false; |
| 23664 | if (parent && child) { |
| 23665 | if (allowVirtualParents) { |
| 23666 | if (parent === child) isContained = true; |
| 23667 | else { |
| 23668 | isContained = false; |
| 23669 | while(child){ |
| 23670 | var nextParent = (0, _getParent.getParent)(child); |
| 23671 | if (nextParent === parent) { |
| 23672 | isContained = true; |
| 23673 | break; |
| 23674 | } |
| 23675 | child = nextParent; |
| 23676 | } |
| 23677 | } |
| 23678 | } else if (parent.contains) isContained = parent.contains(child); |
| 23679 | } |
| 23680 | return isContained; |
| 23681 | } |
| 23682 | |
| 23683 | },{"./getParent":"gp02N","@parcel/transformer-js/src/esmodule-helpers.js":"jA2du"}],"gp02N":[function(require,module,exports) { |
| 23684 | var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js"); |