Színkorrekciók

This commit is contained in:
2025-08-23 00:05:18 +02:00
parent 34a6df5949
commit a1ff3beb35
471 changed files with 63615 additions and 6 deletions
+20
View File
@@ -0,0 +1,20 @@
/**
* Recursively traverse up the tree to check whether the provided child node
* is the parent or a descendant of it.
*
* @param parent - Element to find
* @param child - Element to test against parent
*/
const isNodeOrChild = (parent, child) => {
if (!child) {
return false;
}
else if (parent === child) {
return true;
}
else {
return isNodeOrChild(parent, child.parentElement);
}
};
export { isNodeOrChild };