jxhczhl / JsRpc

远程调用(rpc)浏览器方法,免去抠代码补环境
1.26k stars 313 forks source link

安卓webvivew报错 #23

Open wgetnz opened 7 months ago

wgetnz commented 7 months ago

Uncaught ReferenceError: blob is not defined at WebSocket.socket.ySocket.onmessage (:37:38)

对应代码如下 _this.handlerRequest(blob)

Hlclient.prototype.connect = function () { console.log('begin of connect to wsURL: ' + this.wsURL); var _this = this; try { this.socket["ySocket"] = new WebSocket(this.wsURL); this.socket["ySocket"].onmessage = function (e) { try { let blob = e.data blob.text().then(data => { _this.handlerRequest(data); }) } catch { console.log("not blob") _this.handlerRequest(blob) }

    }
jxhczhl commented 7 months ago

忘了考虑其他版本 或者旧浏览器没有blob,稍等我修改一下 去掉blob

wgetnz commented 7 months ago

忘了考虑其他版本 或者旧浏览器没有blob,稍等我修改一下 去掉blob

在线等大佬修改版本

jxhczhl commented 7 months ago

已更新,请下载最新的js文件和程序。