| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
for a web-worker, window is unavailable butXMLHttpRequest is available on the global 'self' object
|
This would be really useful! |
Sorry, something went wrong.
There was a problem hiding this comment.
How about this:
if (typeof XMLHttpRequest !== 'undefined') {
return XMLHttpRequest;
}And then remove the second check for window.XMLHttpRequest below.
Sorry, something went wrong.
|
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. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
for a web-worker, window is unavailable butXMLHttpRequest is available on the global 'self' object