Skip to content

Commit

Permalink
Use $.ajaxSettings.xhr() to retrieve the XHR object.
Browse files Browse the repository at this point in the history
  • Loading branch information
blueimp committed Feb 10, 2012
1 parent 4a9fa93 commit 4922e27
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions js/cors/jquery.xdr-transport.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/

/*jslint unparam: true */
/*global define, window, XDomainRequest, XMLHttpRequest */
/*global define, window, XDomainRequest */

(function (factory) {
'use strict';
Expand All @@ -26,8 +26,7 @@
}
}(function ($) {
'use strict';
if (window.XDomainRequest && (!window.XMLHttpRequest ||
(new XMLHttpRequest()).withCredentials === undefined)) {
if (window.XDomainRequest && $.ajaxSettings.xhr().withCredentials === undefined) {
$.ajaxTransport(function (s) {
if (s.crossDomain && s.async) {
if (s.timeout) {
Expand Down
2 changes: 1 addition & 1 deletion js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/

/*jslint nomen: true, unparam: true, regexp: true */
/*global $, window, document, XMLHttpRequest */
/*global $, window, document */

$(function () {
'use strict';
Expand Down

0 comments on commit 4922e27

Please sign in to comment.