js 获取代码
```
websocket.onmessage = function(event){
console.log(event.data);
if(event.data instanceof Blob){
if(window.FileReader){
console.log('FileReader')
var reader = new FileReader();
reader.onload = function() {
var uint8 = pako.inflate(reader.result, {to:'array'});
for(var i=0;i<uint8.length;i+=156){
var frame = new dataFrame(uint8.slice(i, i+156));
Vue.set(symbolbox.symbols, frame.Symbol, frame);
}
}
reader.readAsArrayBuffer(event.data);
}else if(event.data.arrayBuffer){
console.log('arrayBuffer')
var promise = event.data.arrayBuffer();
promise.then(function(ret){
var uint8 = pako.inflate(ret, {to:'array'});
for(var i=0;i<uint8.length;i+=156){
var frame = new dataFrame(uint8.slice(i, i+156));
Vue.set(symbolbox.symbols, frame.Symbol, frame);
}
});
}else{
alert("System can't read Blob data");
}
}
```