1
0
Fork 0

fixed print function

This commit is contained in:
Heiko Kernbach 2013-03-14 14:26:01 +01:00
parent d308181b2b
commit e8ccf84b05
2 changed files with 7 additions and 5 deletions

View File

@ -471,9 +471,10 @@ ModuleCache["/internal"] = new Module("/internal");
internal.printShell.apply(internal.printShell, arguments); internal.printShell.apply(internal.printShell, arguments);
// flush buffer // flush buffer
$('#shellContent').append('<p class="shellSuccess">' //$('#shellContent').append('<p class="shellSuccess">'
+ internal.browserOutputBuffer // + internal.browserOutputBuffer
+ '</p>'); // + '</p>');
jqconsole.Write('==> ' + internal.browserOutputBuffer + '\n', 'jssuccess');
internal.browserOutputBuffer = ""; internal.browserOutputBuffer = "";
}; };

View File

@ -96,13 +96,14 @@ var shellView = Backbone.View.extend({
}, },
evaloutput: function (data) { evaloutput: function (data) {
try { try {
var result = eval(data); var result = eval(data);
if (result !== undefined) { if (result !== undefined) {
print(result); print(result);
} }
} }
catch(e) { catch(e) {
$('#shellContent').append('<p class="shellError">Error:' + e + '</p>'); //$('#shellContent').append('<p class="shellError">Error:' + e + '</p>');
jqconsole.Write('ReferenceError: ' + e + '\n', 'jserror');
} }
} }