rename: client -> frontend
This commit is contained in:
parent
db6fff6f26
commit
9384f5399d
592 changed files with 111 additions and 111 deletions
9
packages/frontend/src/scripts/contains.ts
Normal file
9
packages/frontend/src/scripts/contains.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
export default (parent, child, checkSame = true) => {
|
||||
if (checkSame && parent === child) return true;
|
||||
let node = child.parentNode;
|
||||
while (node) {
|
||||
if (node === parent) return true;
|
||||
node = node.parentNode;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue