browserify / http-browserify

node's http module, but for the browser
MIT License
244 stars 110 forks source link

support web-workers XMLHttpRequest #73

Open hankhero opened 9 years ago

hankhero commented 9 years ago

for a web-worker, window is unavailable butXMLHttpRequest is available on the global 'self' object

canastro commented 9 years ago

This would be really useful!

tschaub commented 9 years ago

Agreed this would be useful. For others looking to work around the window checking, you can add this hack to whatever module requires http:

self.window = self;

And with this, window.XMLHttpRequest will be defined.