Skip to main content

Bug Tracker

Side navigation

#3263 closed enhancement (invalid)

Opened August 19, 2008 06:39PM UTC

Closed August 20, 2008 04:21PM UTC

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();

Attachments (0)
Change History (1)

Changed August 20, 2008 04:21PM UTC by flesler comment:1

cc: → jamescampbell
resolution: → invalid
status: newclosed

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