Spaces:
Running
Running
Download src/lib/utils/deepestChild.ts from huggingchat/chat-ui: direct link, hf CLI and curl.
- Browser
- Download file 216 Bytes
-
https://huggingface.co/spaces/huggingchat/chat-ui/resolve/refs%2Fpr%2F511/src/lib/utils/deepestChild.ts
- Command line
-
hf download hf://spaces/huggingchat/chat-ui@refs/pr/511/src/lib/utils/deepestChild.ts
-
curl -L -o deepestChild.ts https://huggingface.co/spaces/huggingchat/chat-ui/resolve/refs%2Fpr%2F511/src/lib/utils/deepestChild.ts
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; | |
| } | |