mirror of
https://github.com/laurent22/joplin.git
synced 2024-11-24 08:12:24 +02:00
10 lines
265 B
TypeScript
10 lines
265 B
TypeScript
/* eslint-disable import/prefer-default-export */
|
|
|
|
export const isInsideContainer = (node: any, className: string): boolean => {
|
|
while (node) {
|
|
if (node.classList && node.classList.contains(className)) return true;
|
|
node = node.parentNode;
|
|
}
|
|
return false;
|
|
};
|