Prettify the code execution output
This commit is contained in:
@ -38,13 +38,14 @@ window.common = (function(global) {
|
||||
codeOutput.setSize('100%', '100%');
|
||||
|
||||
common.updateOutputDisplay = function updateOutputDisplay(str = '') {
|
||||
str = JSON.stringify(str);
|
||||
if (typeof str !== 'string') {
|
||||
str = JSON.stringify(str);
|
||||
}
|
||||
codeOutput.setValue(str);
|
||||
return str;
|
||||
};
|
||||
|
||||
common.appendToOutputDisplay = function appendToOutputDisplay(str = '') {
|
||||
str = JSON.stringify(str);
|
||||
codeOutput.setValue(codeOutput.getValue() + str);
|
||||
return str;
|
||||
};
|
||||
|
Reference in New Issue
Block a user