blind_chat / src /lib /utils /deepestChild.ts
lauro1's picture
test
faca43f
raw
history blame
216 Bytes
export function deepestChild(el: HTMLElement): HTMLElement {
if (el.lastElementChild && el.lastElementChild.nodeType !== Node.TEXT_NODE) {
return deepestChild(el.lastElementChild as HTMLElement);
}
return el;
}