DEV Community

Discussion on: Easy Web Worker integration in VueJS

Collapse
jcalixte profile image
Julien Calixte Author • Edited on

Hi Vicente! Thank you!
Do you want to receive a value from your service worker in you main thread? I think comlink hides the onmessage thing so you can return a value from a method in the web worker. Take a look at this example 🙂
Just remember, methods in web worker will always return a promise.