Changeset 12630

Show
Ignore:
Timestamp:
02/22/08 16:56:27 (11 months ago)
Author:
pottedmeat
Message:

Refs #5602. Update pseudo-classes !strict

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dojo/trunk/_base/xhr.js

    r12291 r12630  
    255255 
    256256        /*===== 
    257         dojo.__ioArgs = function(kwArgs){ 
     257        dojo.__IoArgs = function(       url, content, timeout, form, 
     258                                                                preventCache, handleAs, load, error, handle){ 
    258259                //      url: String 
    259260                //              URL to server endpoint. 
     
    278279                //      load: Function? 
    279280                //              function(response, ioArgs){}. response is an Object, ioArgs 
    280                 //              is of type dojo.__ioCallbackArgs. The load function will be 
     281                //              is of type dojo.__IoCallbackArgs. The load function will be 
    281282                //              called on a successful response. 
    282283                //      error: Function? 
    283284                //              function(response, ioArgs){}. response is an Object, ioArgs 
    284                 //              is of type dojo.__ioCallbackArgs. The error function will 
     285                //              is of type dojo.__IoCallbackArgs. The error function will 
    285286                //              be called in an error case.  
    286                 //      handle: Function 
     287                //      handle: Function? 
    287288                //              function(response, ioArgs){}. response is an Object, ioArgs 
    288                 //              is of type dojo.__ioCallbackArgs. The handle function will 
     289                //              is of type dojo.__IoCallbackArgs. The handle function will 
    289290                //              be called in either the successful or error case.  For 
    290291                //              the load, error and handle functions, the ioArgs object 
    291292                //              will contain the following properties:  
     293                this.url = url; 
     294                this.content = content; 
     295                this.timeout = timeout; 
     296                this.form = form; 
     297                this.preventCache = preventCache; 
     298                this.handleAs = handleAs; 
     299                this.load = load; 
     300                this.error = error; 
     301                this.handle = handle; 
    292302        } 
    293303        =====*/ 
    294304 
    295305        /*===== 
    296         dojo.__ioCallbackArgs = function(kwArgs){ 
     306        dojo.__IoCallbackArgs = function(args, xhr, url, query, handleAs, id, canDelete, json){ 
    297307                //      args: Object 
    298308                //              the original object argument to the IO call. 
     
    328338                //              the same object should be passed to the success 
    329339                //              callbacks directly. 
     340                this.args = args; 
     341                this.xhr = xhr; 
     342                this.url = url; 
     343                this.query = query; 
     344                this.handleAs = handleAs; 
     345                this.id = id; 
     346                this.canDelete = canDelete; 
     347                this.json = json; 
    330348        } 
    331349        =====*/ 
     
    333351 
    334352 
    335         dojo._ioSetArgs = function(/*dojo.__ioArgs*/args, 
     353        dojo._ioSetArgs = function(/*dojo.__IoArgs*/args, 
    336354                        /*Function*/canceller, 
    337355                        /*Function*/okHandler, 
     
    448466        } 
    449467 
    450         var _makeXhrDeferred = function(/*dojo.__xhrArgs*/args){ 
     468        var _makeXhrDeferred = function(/*dojo.__XhrArgs*/args){ 
    451469                //summary: makes the Deferred object for this xhr request. 
    452470                var dfd = _d._ioSetArgs(args, _deferredCancel, _deferredOk, _deferError); 
     
    596614        } 
    597615 
    598         dojo._ioAddQueryToUrl = function(/*dojo.__ioCallbackArgs*/ioArgs){ 
     616        dojo._ioAddQueryToUrl = function(/*dojo.__IoCallbackArgs*/ioArgs){ 
    599617                //summary: Adds query params discovered by the io deferred construction to the URL. 
    600618                //Only use this for operations which are fundamentally GET-type operations. 
     
    606624 
    607625        /*===== 
    608         dojo.__xhrArgs = function(kwArgs){ 
    609                 //      summary: 
    610                 //              In addition to the properties listed for the dojo.__ioArgs type, 
    611                 //              the following properties are allowed for dojo.xhr* methods. 
    612                 //      handleAs:  
    613                 //              String. Acceptable values are: 
    614                 //                      "text" (default) 
    615                 //                      "json" 
    616                 //                      "json-comment-optional" 
    617                 //                      "json-comment-filtered" 
    618                 //                      "javascript" 
    619                 //                      "xml" 
    620                 //      sync: 
    621                 //              Boolean. false is default. Indicates whether the request should 
    622                 //              be a synchronous (blocking) request. 
    623                 //      headers: 
    624                 //              Object. Additional HTTP headers to send in the request. 
    625         } 
     626        dojo.declare("dojo.__XhrArgs", dojo.__IoArgs, { 
     627                constructor: function(handleAs, sync, headers){ 
     628                        //      summary: 
     629                        //              In addition to the properties listed for the dojo._IoArgs type, 
     630                        //              the following properties are allowed for dojo.xhr* methods. 
     631                        //      handleAs: String? 
     632                        //              Acceptable values are: text (default), json, json-comment-optional, 
     633                        //              json-comment-filtered, javascript, xml 
     634                        //      sync: Boolean? 
     635                        //              false is default. Indicates whether the request should 
     636                        //              be a synchronous (blocking) request. 
     637                        //      headers: Object? 
     638                        //              Additional HTTP headers to send in the request. 
     639                        this.handleAs = handleAs; 
     640                        this.sync = sync; 
     641                        this.headers = headers; 
     642                } 
     643        }); 
    626644        =====*/ 
    627645 
    628         dojo.xhr = function(/*String*/ method, /*dojo.__xhrArgs*/ args, /*boolean?*/ hasBody){ 
     646        dojo.xhr = function(/*String*/ method, /*dojo.__XhrArgs*/ args, /*boolean?*/ hasBody){ 
    629647                //      summary:  
    630648                //              Sends an HTTP request with the given method. If the request has an  
     
    640658        } 
    641659 
    642         dojo.xhrGet = function(/*dojo.__xhrArgs*/ args){ 
     660        dojo.xhrGet = function(/*dojo.__XhrArgs*/ args){ 
    643661                //      summary:  
    644662                //              Sends an HTTP GET request to the server. 
     
    646664        } 
    647665 
    648         dojo.xhrPost = function(/*dojo.__xhrArgs*/ args){ 
     666        dojo.xhrPost = function(/*dojo.__XhrArgs*/ args){ 
    649667                //summary:  
    650668                //              Sends an HTTP POST request to the server. 
     
    652670        } 
    653671 
    654         dojo.rawXhrPost = function(/*dojo.__xhrArgs*/ args){ 
     672        dojo.rawXhrPost = function(/*dojo.__XhrArgs*/ args){ 
    655673                //      summary: 
    656674                //              Sends an HTTP POST request to the server. In addtion to the properties 
    657                 //              listed for the dojo.__xhrArgs type, the following property is allowed: 
     675                //              listed for the dojo.__XhrArgs type, the following property is allowed: 
    658676                //      postData: 
    659677                //              String. The raw data to send in the body of the POST request. 
     
    663681        } 
    664682 
    665         dojo.xhrPut = function(/*dojo.__xhrArgs*/ args){ 
     683        dojo.xhrPut = function(/*dojo.__XhrArgs*/ args){ 
    666684                //      summary: 
    667685                //              Sends an HTTP PUT request to the server. 
     
    669687        } 
    670688 
    671         dojo.rawXhrPut = function(/*dojo.__xhrArgs*/ args){ 
     689        dojo.rawXhrPut = function(/*dojo.__XhrArgs*/ args){ 
    672690                //      summary: 
    673691                //              Sends an HTTP PUT request to the server. In addtion to the properties 
    674                 //              listed for the dojo.__xhrArgs type, the following property is allowed: 
     692                //              listed for the dojo.__XhrArgs type, the following property is allowed: 
    675693                //      putData: 
    676694                //              String. The raw data to send in the body of the PUT request. 
     
    684702        } 
    685703 
    686         dojo.xhrDelete = function(/*dojo.__xhrArgs*/ args){ 
     704        dojo.xhrDelete = function(/*dojo.__XhrArgs*/ args){ 
    687705                //      summary: 
    688706                //              Sends an HTTP DELETE request to the server.