views:

148

answers:

2

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?

A: 

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

olliej
A: 

Here is your solution: http://sviudes.blogspot.com/2009/09/simular-un-include-en-un-worker-de.html