1

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?

Community
  • 1
  • 1
brad
  • 413
  • 2
  • 5
  • 10

2 Answers2

0

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

olliej
  • 32,789
  • 8
  • 55
  • 54
0

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