virto-network / valor

Create HTTP APIs with a plugin system that runs in the server and the browser.
GNU General Public License v3.0
9 stars 8 forks source link

[web] Run in web worker #2

Open olanod opened 3 years ago

olanod commented 3 years ago

valor.js(the runtime, not the plugins) can be loaded and run in the main thread of the browser but should also be able to run when loaded as a Worker.

olanod commented 3 years ago

Main offender is using window directly. Here is an example on how to get the global scope in a worker/window independent way.