borisreitman/CrossXHR — Issue #1: Problem to replace XHR in jQuery
Author: ChrisCinelli
Created: 2011-11-23 05:35:19+00:00
State: open

I tried to do:

```javascript
$.ajax({
type: 'GET',
dataType: 'html',
xhr: function(){return new CrossXHR();},
url: "http://"+ encodeURI(opt.url),
success:function(data){
console.log('success');
console.log(data);
//callback(data);
},
error: function(jqXHR,errtype,errObj) {
console.log("jqXHR");
console.log(jqXHR);
console.log("errtype");
console.log(errtype);
console.log("errObj");
console.log(errObj);
}
});
```
But I get:

> "'undefined' is not a function (evaluating 'xhr.getAllResponseHeaders()')"
>

There are other things like this out there (ex: http://www.jimbojw.com/wiki/index.php?title=SWFHttpRequest.hx ) but this is the only one I was able to see work (at least without jQuery) on my MacBook Pro with the latest Flash Plugin installed.