Bug Tracker

Modify

Ticket #3263 (closed enhancement: invalid)

Opened 5 years ago

Last modified 5 years ago

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

comment:1 Changed 5 years ago by flesler

  • Cc jamescampbell added
  • Status changed from new to closed
  • Resolution set to invalid

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

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.