Closed unlocomqx closed 5 years ago
You can send additional message with converted data:
worker.post({ message: 'image', image: jpg })
It is better because SVG→JPG conversion can take a while and you can load OffscreenCanvas while an image is loading.
Will it help you?
Yes, I will try it
Thank you
In my use case, I'm converting a SVG to JPG so I need to pass the svg code to the worker. It would be better if the
createWorker
function would accept adata
argument to pass arbitrary dataPS: I can assign the svg code to the
canvas
dataset for now