Yeah, this is an issue. We thought about it awhile ago and decided an include() API on the inside of the worker would be better. But we haven't implemented it yet :(.
Here's a blog entry I wrote that shows how to simulate it, which is more involved than it at first seems: http://blog.youngpup.net/2007/09/simulating-include-in-workers.html - a On Sat, Nov 8, 2008 at 6:55 PM, Khookie <[EMAIL PROTECTED]> wrote: > > I have js files that I would like to share across multiple worker > files. I find it pretty useful myself to avoid code duplication while > coding the workers. > > For example, I've got a hack function at the moment called > createWorkerFromUrls([url1, url2, url3]) where it gets each file via > httprequest and waits on a timer until they're all fetched. Then > they're joined together and passed to > workerPool.createWorker(jsString); > > Any possibility of a method like this down the track? > > Chris >
