0
0

🧑‍💻 automatically scroll output area to bottom on new text

This commit is contained in:
DrMaxNix 2022-09-28 16:59:59 +02:00
parent cae42e4fbd
commit 4e1539e85c

View File

@ -92,6 +92,7 @@
span_one_line.textContent = one_line; span_one_line.textContent = one_line;
document.getElementById("text-output-area").appendChild(span_one_line); document.getElementById("text-output-area").appendChild(span_one_line);
document.getElementById("text-output-area").scrollTop = document.getElementById("text-output-area").scrollHeight;
} }
} }
let my_error_callback = function(text, type){ let my_error_callback = function(text, type){
@ -101,6 +102,7 @@
span_one_line.textContent = text + "\n"; span_one_line.textContent = text + "\n";
document.getElementById("text-output-area").appendChild(span_one_line); document.getElementById("text-output-area").appendChild(span_one_line);
document.getElementById("text-output-area").scrollTop = document.getElementById("text-output-area").scrollHeight;
} }
let juicescript = new Juicescript({ let juicescript = new Juicescript({