Ticket #3775 (closed bug: duplicate)
$.get() doesn't shift 'type' argument when 'data' argument is omitted
| Reported by: | Wim Leers | Owned by: | aflesler |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.4 |
| Component: | ajax | Version: | 1.3.1 |
| Keywords: | get | Cc: | |
| Blocking: | Blocked by: |
Description
callback is shifted, but type isn't.
Attachments
Change History
comment:2 Changed 4 years ago by john
- Version changed from 1.2.6 to 1.3.1
- Milestone changed from 1.3 to 1.3.2
I think this is OK, though - the type argument isn't meant to be used by external developers (it's for internal uses, only). Actually, it should probably just be removed outright.
comment:3 Changed 4 years ago by dmethvin
Also, it's tricky to shift the parameters because getScript and getJSON always pass the type as the fourth arg even if not all the args are provided.
Maybe we just need the docs to clarify that if an arg is left out it should be replaced with a null rather than shifting down the subsequent args.
comment:4 Changed 4 years ago by dmethvin
See duplicate #4384 for a patch that can be applied if this functionality is not removed. Note that $.get and $.post publicly document that type is a parameter so I'm not sure it can be removed at this point without heartache.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

