45e8331e26
Closes #12, #227 and #58
9 lines
164 B
JavaScript
9 lines
164 B
JavaScript
export default (parent, child) => {
|
|
let node = child.parentNode;
|
|
while (node) {
|
|
if (node == parent) return true;
|
|
node = node.parentNode;
|
|
}
|
|
return false;
|
|
};
|