Question

how does one include other .js files in the .js of a Worker. Every "include" solution for Javascript that I've found does it by loading into a tag, which is not an option for Workers since they don't have access to the DOM.

I see from your 950087/include-javascript-file-inside-javascript-file that using Ajax and eval() will do it. I can figure that out but please point me to reference implementation if there's an easy one.

Someone proposed WorkerPool.load() back in 2007 here http://code.google.com/p/gears/wiki/NewWorkerPoolFeatures?redir=1 . Was anything like that ever done?

Was it helpful?

OTHER TIPS

HTML5 Workers (as supported by Safari 4 and Firefox 3.5) has the importScripts function -- presumably Gears also supports it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top