#11304 closed bug (invalid)
Excess code in script.js?
Reported by: | dcherman | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | ajax | Version: | 1.7.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I didn't want to file a PR since I might be wrong, but I don't think the following line actually does anything:
https://github.com/jquery/jquery/blob/master/src/ajax/script.js#L25
If s.crossDomain is true, the corresponding script ajaxTransport doesn't even use the s.type property, so why set it?
Change History (4)
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
Gotcha. Would you entertain a PR to add a comment above that line explaining exactly what you just described in case anyone has the same question in the future?
comment:3 Changed 11 years ago by
Component: | unfiled → ajax |
---|---|
Priority: | undecided → low |
Resolution: | → invalid |
Status: | new → closed |
@dcherman jaubourg may reply to this himself, but it's probably a good idea to go ahead and make the PR to add the comment and continue the discussion about whether it's worth adding on GH. That said, I imagine someone that has the same question in the future might try doing search of tickets on the tracker for further info.. :)
comment:4 Changed 11 years ago by
I honestly dunno if a comment would benefit much. Code is pretty straight-forward in stating that cross-domain script requests are handled as GET requests.
Consistency: the request automagically became a GET request because it was cross domain, callbacks can inspect the options object and control/use it.