Modify ↓
Ticket #3263 (closed enhancement: invalid)
xmlhttprequest change
| Reported by: | jamescampbell | Owned by: | |
|---|---|---|---|
| Priority: | trivial | Milestone: | 1.3 |
| Component: | core | Version: | 1.2.6 |
| Keywords: | ajax, xmlhttprequest | Cc: | jamescampbell |
| Blocking: | Blocked by: |
Description
woudn't putting this in the code be better:
if(typeof(XMLHttpRequest) == "undefined")){
XMLHttpRequest = function(){
var xmlHttp = null;
try
{
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
return xmlHttp;
}
}
so later instead of using this.
var xhr = window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
you use this
var xhr = new XMLHttpRequest();
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

No, jQuery doesn't alter the enviroment. This way we don't cause conflicts with other frameworks/scripts.