Add more window globals and shims in task shell

This allows jQuery to be successfully loaded from a web worker
since it does not have a document or window object by default.

Previously it would log about missing methods and properties.

Closes #228
This commit is contained in:
Kevin Sawicki
2013-02-04 11:41:51 -08:00
parent 0bb0863b61
commit cd07ec841d
4 changed files with 48 additions and 4 deletions

View File

@@ -17,7 +17,10 @@ class Task
startWorker: ->
@callWorkerMethod 'start'
resourcePath: window.resourcePath
globals:
resourcePath: window.resourcePath
navigator:
userAgent: navigator.userAgent
requirePath: require.getPath('require')
handlerPath: @path