Y
Hacker News
new
|
ask
|
show
|
jobs
by
jagged-chisel
2231 days ago
Indeed. I'd suggest a change in this code even if this change in FF hadn't arrived.
2 comments
1f60c
2231 days ago
I think GP was joking. A far more straightforward way to shorten text to a given length is:
const shorten = (text, length) => text.substring(0, length);
link
seanmcdirmid
2231 days ago
Probably way more efficient than relying on a side effect to a DOM update as well.
link
_0w8t
2231 days ago
But it is the Web. Somebody must be using it.
link
gruez
2231 days ago
whoosh
link