developit / web-worker

Consistent Web Workers in browser and Node.

Home Page:https://npm.im/web-worker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improved Electron support

fabiospampinato opened this issue · comments

I think this module will throw at runtime in an Electron environment where Node isolation is not turned on, it's a weird sort of environment with both a global Worker and worker_threads, though worker_threads just throw at runtime for some reason there. So I think the implementation for Node should still check if there's a global "Worker" available, and if so it should just return that.