vue-worker
vue-worker copied to clipboard
setInterval dosen't work
This is my code:
methods: {
setTimer(val) {
this.timerWorker = this.$worker.run(function(val) {
console.log(setInterval)
console.log(val)
const timer = setInterval(function() {
val -= 17
console.log('setInterval', val)
}, 17);
return val
}, [val]).then(res => {
console.log(res)
})
}
}
And then, 'setInterval' didn't show up.
in my code, it dit show up.
I have this issue too. setInterval not working inside $worker. Any solutions?
i have this issue too!!
i have this issue too
+1