/** * Stark specific DOM commands */ export declare class StarkDOMUtil { /** * Recursive function to look for the parent element with the specified tag name * it will stop the recursion when it reaches the element * @param element - HTML element whose parent will be searched. * @param tagName - Tag name of the parent element to be searched. * @returns The searched element in case it was found, otherwise it returns undefined */ static searchParentElementByTag(element: Element, tagName: string): Element | undefined; /** * Recursive function to look for the parent element with the specified class * it will stop the recursion when it reaches the element * @param element - HTML element whose parent will be searched * @param className - Class name of the parent element to be searched * @returns The searched element in case it was found, otherwise it returns undefined. */ static searchParentElementByClass(element: Element, className: string): Element | undefined; /** * Recursive function to look for the parent element with one of the specified classes * it will stop the recursion when it reaches the element * @param element - HTML element whose parent will be searched * @param classNames - Array containing the class names of the parent element to be searched * @returns The searched element in case it was found, otherwise it returns undefined. */ static searchParentElementByClasses(element: Element, classNames: string[]): Element | undefined; /** * Recursive function to look for the parent element with the specified html id * it will stop the recursion when it reaches the element * @param element - HTML element whose parent will be searched. * @param htmlId - HTML id of the parent element to be searched. * @returns The searched element in case it was found, otherwise it returns undefined. */ static searchParentElementById(element: Element, htmlId: string): Element | undefined; /** * Search starting at the root element and return the set of elements matching the given selector. * @param rootElement - HTML element that will be the base for search selector. * @param selector - CSS selector of the element(s) to be searched. * @returns The list of nodes that were found, otherwise it returns undefined. */ static getElementsBySelector(rootElement: Element, selector: string): NodeListOf; /** * To check if an element has a certain class * @param element - The element to be checked * @param classname - The classname being searched * @returns True if the element has the requested class */ static hasClass(element: Element, classname: string): boolean; }