Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When making JSONP requests:
settings.beforeSend
wasn't being called.ajaxBeforeSend
andajaxError
events weren't being fired.$.ajax
and$.ajaxJSONP
. In$.ajax
when there is a timeout,ajaxError
is called and that subsequentely callsajaxComplete
. In$.ajaxJSONP
, a timeout skipsajaxError
and callsajaxComplete
twice. First with a status of abort and then again with a status of timeout.xhr.abort()
or (2) because of a timeout, or (3) the request raises anonerror
event, the globalwindow[callbackName]
is set tofunction empty () {}
instead of deleting it. So the global scope stays polluted andempty()
retains a reference to<script>
which then can't be garbage collected.xhr.abort()
and there is a timeout set, the timeout would not to be cleared.$.ajaxJSONP
and there is an error then there is no cleaning up of<script>
orwindow[callbackName]
, the error event isn't fired, and$.active
isn't updated. (Kinda related to 4).I only wrote tests for (1) and (6). Any help?