I generally agree. However, I'm currently working on a reusable Vue component that offloads heavy calculations to workers. I'm aiming at providing a simple way to pass additional evaluators, functions, so that anyone who uses the component can easily extend it's function without having to manually play around with workers.
For internal development, definitely, I'd define everything there too.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Passing serialized functions around may be not secure. It's better to define all needed functions inside the worker.
I generally agree. However, I'm currently working on a reusable Vue component that offloads heavy calculations to workers. I'm aiming at providing a simple way to pass additional evaluators, functions, so that anyone who uses the component can easily extend it's function without having to manually play around with workers.
For internal development, definitely, I'd define everything there too.