Opened 14 years ago
Closed 14 years ago
#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 |
Blocked by: | Blocking: |
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 (1)
comment:1 Changed 14 years ago by
Cc: | jamescampbell added |
---|---|
Resolution: | → invalid |
Status: | new → closed |
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.