outsystems-ui
Version:
OutSystems UI Framework
18 lines (17 loc) • 524 B
text/typescript
// eslint-disable-next-line @typescript-eslint/no-unused-vars
namespace OutSystems.OSUI.Utils {
/**
* [Deprecated] Function to get closest element, in use by AnimatedLabel
*
* @export
* @param {HTMLElement} elem
* @param {string} selector
* @return {*} {*}
*
*/
//TODO: Is this function necessary?
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function GetClosest(elem: HTMLElement, selector: string): any {
return elem.closest(selector) ? elem.closest(selector) : false;
}
}