Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

onComplete and JSON in Xhr

#474

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

Reported by ruslan · August 4th, 2011 @ 03:01 AM

State: resolved
Milestone: none
Assigned to: nobody

Activity

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.