How is it possible to send a (copy of) function from my main thread to my worker?
Whenever I try: worker.postMessage({data, func: (data) => data)
, firefox gives me an error message: DataCloneError: The object could not be cloned.
As for Chrome, the message differ, but the error still occur: Uncaught DOMException: Failed to execute 'postMessage' on 'Worker': An object could not be cloned.