Hacker News new | ask | show | jobs
by ridiculous_fish 3398 days ago
This didn't work in my case because I had references to other functions, for complex number handling and the like. I ended up just loading the whole minified .js file again in the Worker, which worked though it felt ridiculous.
1 comments

One of the native functions available in a web worker is importScript - it allows to load include other scripts (eg lodash) into the worker scope.