aboutsummaryrefslogtreecommitdiffstats
path: root/test/ng/rootElementSpec.js
diff options
context:
space:
mode:
authorCaitlin Potter2014-03-18 11:11:39 -0400
committerCaitlin Potter2014-03-18 21:49:35 -0400
commit6680b7b97c0326a80bdccaf0a35031e4af641e0e (patch)
tree15e0c68a27bab56a618868ba10e83b4cdfef33f6 /test/ng/rootElementSpec.js
parentc839f78b8f2d8d910bc2bfc9e41b3e3b67090ec1 (diff)
downloadangular.js-6680b7b97c0326a80bdccaf0a35031e4af641e0e.tar.bz2
fix($httpBackend): don't error when JSONP callback called with no parameter
This change brings Angular's JSONP behaviour closer in line with jQuery's. It will no longer treat a callback called with no data as an error, and will no longer support IE8 via the onreadystatechanged event. BREAKING CHANGE: Previously, the JSONP backend code would support IE8 by relying on the readystatechanged events. This is no longer the case, as these events do not provide adequate useful information for deeming whether or not a response is an error. Previously, a JSONP response which did not pass data into the callback would be given a status of -2, and treated as an error. Now, this situation will instead be given a status of 200, despite the lack of data. This is useful for interaction with certain APIs. Previously, the onload and onerror callbacks were added to the JSONP script tag. These have been replaced with jQuery events, in order to gain access to the event object. This means that it is now difficult to test if the callbacks are registered or not. This is possible with jQuery, using the $.data("events") method, however it is currently impossible with jqLite. This is not expected to break applications. Closes #4987 Closes #6735
Diffstat (limited to 'test/ng/rootElementSpec.js')
0 files changed, 0 insertions, 0 deletions