在实机测试没有问题,只在开发者工具中报错,经测macOS端开发者工具也是一样情况。
worker中的代码 :
var test = function(){
console.log("timeout tick");
}
setTimeout(test,1000);
开发者工具console信息
VM32:3 Uncaught ReferenceError: Reporter is not defined
at setTimeout (eval at self.onmessage.event (weixinworker.js:6), <anonymous>:3:10423)
at eval (eval at self.onmessage.event (weixinworker.js:6), <anonymous>:8:1)
at require (eval at self.onmessage.event (weixinworker.js:6), <anonymous>:3:24484)
at o (eval at self.onmessage.event (weixinworker.js:6), <anonymous>:3:23372)
at eval (eval at self.onmessage.event (weixinworker.js:6), <anonymous>:3:13744)
at eval (eval at self.onmessage.event (weixinworker.js:6), <anonymous>:1:3789)
at Array.forEach (<anonymous>)
at Object.h (eval at self.onmessage.event (weixinworker.js:6), <anonymous>:1:3747)
at self.onmessage.event (weixinworker.js:10)
多谢反馈,并不是 setTimeout 在工具中不可用,而是我们内部逻辑的报错,目前已定位到问题,我们下个版本修复一下
我这里还是报这个做,代码类似,这个Reporter是指什么呢?
太感谢了,期待更新。