mirror of
https://github.com/jashkenas/backbone.git
synced 2026-04-30 03:00:06 -04:00
Merge pull request #3172 from gmajoulet/master
Removing the IE8 PATCH requests fix
This commit is contained in:
13
backbone.js
13
backbone.js
@@ -1235,15 +1235,6 @@
|
||||
params.processData = false;
|
||||
}
|
||||
|
||||
// If we're sending a `PATCH` request, and we're in an old Internet Explorer
|
||||
// that still has ActiveX enabled by default, override jQuery to use that
|
||||
// for XHR instead. Remove this line when jQuery supports `PATCH` on IE8.
|
||||
if (params.type === 'PATCH' && noXhrPatch) {
|
||||
params.xhr = function() {
|
||||
return new ActiveXObject("Microsoft.XMLHTTP");
|
||||
};
|
||||
}
|
||||
|
||||
// Pass along `textStatus` and `errorThrown` from jQuery.
|
||||
var error = options.error;
|
||||
options.error = function(xhr, textStatus, errorThrown) {
|
||||
@@ -1258,10 +1249,6 @@
|
||||
return xhr;
|
||||
};
|
||||
|
||||
var noXhrPatch =
|
||||
typeof window !== 'undefined' && !!window.ActiveXObject &&
|
||||
!(window.XMLHttpRequest && (new XMLHttpRequest).dispatchEvent);
|
||||
|
||||
// Map from CRUD to HTTP for our default `Backbone.sync` implementation.
|
||||
var methodMap = {
|
||||
'create': 'POST',
|
||||
|
||||
Reference in New Issue
Block a user