Bug Tracker

Changeset 5805

Show
Ignore:
Timestamp:
08/04/08 14:18:06 (1 year ago)
Author:
aflesler
Message:

jquery ajax: closes #3087, #2167, #2128. The ajax transport creation process is exposed to allow overriding.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/jquery/src/ajax.js

    r5733 r5805  
    9898 
    9999jQuery.extend({ 
     100   
    100101    get: function( url, data, callback, type ) { 
    101102        // shift arguments if data argument was ommited 
     
    113114        }); 
    114115    }, 
     116     
     117    // Create the request object; Microsoft failed to properly 
     118    // implement the XMLHttpRequest in IE7, so we use the ActiveXObject when it is available 
     119    getAjaxTransport : function() { 
     120        return window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest(); 
     121    }, 
     122 
    115123 
    116124    getScript: function( url, callback ) { 
     
    274282        var requestDone = false; 
    275283 
    276         // Create the request object; Microsoft failed to properly 
    277         // implement the XMLHttpRequest in IE7, so we use the ActiveXObject when it is available 
    278         var xhr = window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest(); 
     284        // Create the request object 
     285        var xhr = jQuery.getAjaxTransport(); 
    279286 
    280287        // Open the socket