mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-23 16:44:11 -08:00
13 lines
441 B
JavaScript
13 lines
441 B
JavaScript
|
function $rt_putStdout(ch) {
|
||
|
if (ch == 0xA) {
|
||
|
var lineElem = document.createElement("div");
|
||
|
var stdoutElem = document.getElementById("stdout");
|
||
|
lineElem.appendChild(document.createTextNode($rt_stdoutBuffer));
|
||
|
stdoutElem.appendChild(lineElem);
|
||
|
$rt_stdoutBuffer = "";
|
||
|
stdoutElem.scrollTop = stdoutElem.scrollHeight;
|
||
|
} else {
|
||
|
$rt_stdoutBuffer += String.fromCharCode(ch);
|
||
|
}
|
||
|
}
|