Is it possible to safely use eval in a web worker to execute arbitrary user code?

Viewed 3227

Is it possible to offload custom user code that would be evaled to a Web Worker in a safe way?

The "only communicate" with strings feature of the Web Workers look promising but eval'ing user code is pretty much always dangerous in interesting ways.

I can't find much information on the web about it. Would there be a good way to do that either client side or with some server-side sanitizing or something else?

2 Answers
Related