http-browserify
http-browserify copied to clipboard
support web-workers XMLHttpRequest
for a web-worker, window is unavailable butXMLHttpRequest is available on the global 'self' object
This would be really useful!
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.