代码片段:
$.onMessageEvent = function(evt){
console.log("收到消息:"+evt.data);
var reader = new FileReader();
reader.onload = function(evt){
if(evt.target.readyState == FileReader.DONE){
var data = new Uint8Array(evt.target.result);
*****其它代码**
}
}
reader.readAsArrayBuffer(evt.data);
}
错误信息:
[JS Framework] Failed to execute the callback function:
18:51:42.177 ReferenceError: Can't find variable: FileReader
18:51:42.197 54:49.678 6007 6040 E console : [ERROR] reportJSException >>>> exception function:WEEX_CALL_JAVASCRIPT, exception:JavaScript execute error!ReferenceError: Can't find variable: FileReader
18:51:42.217 54:49.678 6007 6040 E console : getTemplateInfo== template md5 null ,httpHeader:{}
0 个回复