onComplete and JSON in Xhr
Reported by ruslan | August 4th, 2011 @ 03:01 AM
if your code looks like that:
var xhr = new Xhr('/some/url/', {
onComplete: function(request) {
if (request.successful()) {
var json = request.responseJSON;
// json is undefined
}
}
,).send();
you will never get JSON content because in stateChanged
"complete" fired before "success"
(2.2.3 - line 4568 in right-src.js) and tryScripts will be called
after your code
Comments and changes to this ticket
-
MadRabbit October 15th, 2011 @ 12:04 PM
- State changed from new to resolved
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
RightJS Core Tickets