I have a similar task and solve it as pointed in Ahmet Emrebas's post. The div, I want to have all time content scrolled down, needs to be included in other dummy/container div. I call divbot.scrollIntoView({ behavior: "smooth", block: "end" }) after adding a new content in the divbot. CSS may look like:
.container-div {
opacity:0.9;
background-color:#ddd;
position:fixed;
width:100%;
height:100%;
top:0px;
left:0px;
overflow:auto;
z-index:998;
}
.container-div > div {
padding: 1em;
color: #0e131f;
font-family: monospace;
}
CSS needs to be edited to reflect actual div size and other attributes as desired.