cujojs/curl — pull request #122 by alanpearce (2012-08-11 18:23:38+00:00)
Title: WIP: WebWorker support

I created a plugin to load a module as a worker, and modified curl.js to work from within a worker.

There isn't any detection for worker support right now, which is the biggest missing feature for me.

There are a few ways I thought of to do this:
- The most obvious way (to me) would be to just `require` the file as normal in the worker plugin, perhaps using `setTimeout` to fake asynchronicity. I'm not sure if this is a good idea though.
- Alternatively, a shim module could be added, to check for `window.Worker` and return `Worker`, whether it's fake or real.
- Do something with `has!`, loading a non-worker module instead if the browser doesn't support Workers.

Currently I've done the bare minimum to get it to work, suggestions for improvement are certainly welcome.