Hugging Face
Models
Datasets
Spaces
Posts
Docs
Solutions
Pricing
Log In
Sign Up
Spaces:
Duplicated from
huggingchat/chat-ui
SoSa123456
/
chat-ui
like
0
Build error
App
Files
Files
Community
6f12e84
chat-ui
/
src
/
lib
/
utils
/
deepestChild.ts
coyotte508
HF staff
✨ Remove endoftext (#70)
0abf663
unverified
over 1 year ago
raw
Copy download link
history
blame
Safe
167 Bytes
export
function
deepestChild
(
el: HTMLElement
) {
let
newEl = el;
while
(newEl.
hasChildNodes
()) {
newEl = newEl.
lastElementChild
as
HTMLElement
;
}
return
newEl;
}