This commit is contained in:
Joao Moreno
2019-06-14 10:32:12 +02:00
parent c43b97e6a2
commit 5ece1f176f
5 changed files with 30 additions and 4 deletions

View File

@@ -768,6 +768,10 @@ export function findParentWithClass(node: HTMLElement, clazz: string, stopAtClaz
return null;
}
export function hasParentWithClass(node: HTMLElement, clazz: string, stopAtClazzOrNode?: string | HTMLElement): boolean {
return !!findParentWithClass(node, clazz, stopAtClazzOrNode);
}
export function createStyleSheet(container: HTMLElement = document.getElementsByTagName('head')[0]): HTMLStyleElement {
let style = document.createElement('style');
style.type = 'text/css';