Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
const scrollDown = () => {
try {
var chatWindow = document.getElementById("div-id")
var xH = chatWindow.scrollHeight
chatWindow.scrollTo(0, xH)
} catch (e) {
console.log('Erro ao scrolar ou encontrar a div');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment