Open wgetnz opened 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) }
}
忘了考虑其他版本 或者旧浏览器没有blob,稍等我修改一下 去掉blob
在线等大佬修改版本
已更新,请下载最新的js文件和程序。
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) }