Commit 3dd7b98c by Sheng

Defined a method onerror on reader

parent 4c3120e5
......@@ -213,7 +213,7 @@ jQuery(function($){
sock.onmessage = function(msg) {
var reader = new window.FileReader();
reader.onloadend = function(){
reader.onload = function(){
var text = decoder.decode(reader.result);
// console.log(text);
if (term) {
......@@ -225,11 +225,15 @@ jQuery(function($){
}
};
reader.onerror = function(e) {
console.error(e);
};
reader.readAsArrayBuffer(msg.data);
};
sock.onerror = function(e) {
console.log(e);
console.error(e);
};
sock.onclose = function(e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment