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