This commit is contained in:
Liang Ding 2014-08-22 15:44:57 +08:00
parent 73cd1c6538
commit 71eb6a8eb5
1 changed files with 2 additions and 6 deletions

View File

@ -6,14 +6,10 @@ outputWS.onopen = function() {
outputWS.onmessage = function(e) { outputWS.onmessage = function(e) {
console.log('[output onmessage]' + e.data); console.log('[output onmessage]' + e.data);
var data = JSON.parse(e.data); var data = JSON.parse(e.data);
if ('run' === data.cmd) { if ('run' === data.cmd) {
console.log('run: ' + data.cmd);
$('#output').val($('#output').val() + data.output); $('#output').val($('#output').val() + data.output);
} else if ('build' === data.cmd) { } else if ('build' === data.cmd) {
console.log('build: ' + data.cmd);
$('#output').val(data.output); $('#output').val(data.output);
if (0 != data.output.length) { // 说明编译有错误输出 if (0 != data.output.length) { // 说明编译有错误输出