1
0
mirror of https://github.com/misskey-dev/misskey synced 2025-01-13 21:33:51 +09:00
misskey/src/web/app/common/scripts/contains.js
syuilo 45e8331e26 🍣
Closes #12, #227 and #58
2017-03-18 20:05:11 +09:00

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;
};