Opened 14 years ago
Closed 14 years ago
#3603 closed feature (invalid)
JSONP callback with multiple parameters
Reported by: | ricardoe | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.3 |
Component: | ajax | Version: | 1.2.6 |
Keywords: | jsonp, parameters, callback | Cc: | ricardoe |
Blocked by: | Blocking: |
Description
JSONP callbacks only allow one parameter, I've modified the jQuery 1.2.6 code so I can use any number of parametes with the success function.
For Rev. 5891
Lines 2827 - 2828: if ( s.success )
s.success( data, status );
Becomes: if ( s.success ) {
data = jQuery.makeArray(data); data.push(status); s.success.apply(this,data);
}
And line 2629 data = tmp;
Now is: data = arguments;
I hope this is revised and introduced, restrict the number of params you can send to a function is, IMHO not a good thing.
Sorry, this is my first bug report.
Change History (2)
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
Cc: | ricardoe added |
---|---|
need: | Patch → Review |
Priority: | major → minor |
Resolution: | → invalid |
Status: | new → closed |
Type: | bug → feature |
Everyone uses JSONP with one single argument, $.ajax's success callback ALWAYS receives one argument.
I don't see any need to add this, you can simply pass an array of objects (or w/e) instead of just one element.
Sorry I screw the code.
Lines 2827 - 2828:
Becomes:
And line 2629:
Now is: