So I'm writing some javascript¹ for a textbox that automatically scrolls when new content is added but only if you're already scrolled to the bottom, and I'm actually more than a little confused about how to detect I'm already at the bottom. What would be a lot easier, the way I'm doing this, is to detect that the bottom item is visible on screen, and to force a rescroll when a change occurs while bottom item is visible. So scrolling ALMOST to the bottom would "lock"

¹ okay, Rust. It's cursed