mirror of
https://github.com/luau-lang/luau.git
synced 2024-11-15 14:25:44 +08:00
Fix repeated calls to print() clearing output
This commit is contained in:
parent
fedd9a5f78
commit
d079201a6e
@ -64,11 +64,7 @@
|
||||
var lastError = undefined;
|
||||
|
||||
function output(text) {
|
||||
var output_clear = document.getElementById("output-clear");
|
||||
var output_box = document.getElementById("output");
|
||||
if (output_clear.checked) {
|
||||
output_box.value = '';
|
||||
}
|
||||
output_box.value += text.replace('stdin:', '') + "\n";
|
||||
// scroll to bottom
|
||||
output_box.scrollTop = output_box.scrollHeight;
|
||||
@ -84,6 +80,12 @@
|
||||
lastError = undefined;
|
||||
}
|
||||
|
||||
var output_clear = document.getElementById("output-clear");
|
||||
if (output_clear.checked) {
|
||||
var output_box = document.getElementById("output");
|
||||
output_box.value = '';
|
||||
}
|
||||
|
||||
var err = Module.ccall('executeScript', 'string', ['string'], [editor.getValue()]);
|
||||
if (err) {
|
||||
var err_text = err.replace('stdin:', '');
|
||||
|
Loading…
Reference in New Issue
Block a user