Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#2716 closed defect (fixed)

M2: XHR support for sync mode on XHR objects is broken.

Reported by: guest Owned by: alex
Priority: high Milestone:
Component: IO Version: 0.9
Keywords: Cc:
Blocked By: Blocking:


In the new code split for 0.9 and the refactoring of io.bind() into separate calls, there appears to be a problem with 'sync' and XHR. With the sync flag set, the execution doesn't appear to behave sync anyway. It looks like the callbacks are not getting fired at the appropriate time. A simple testcase that depnstrates this is below:

function testXhr_sync(t){

summary: Simple test of sync'ed xhr description: Simple test of sync'ed xhr var d = new tests.Deferred();

var getArgs = {

url: "test.txt", handleAs: "text", sync: true };

var handler = dojo.xhrGet(getArgs);

console.debug("Has the handler fired? " + handler.fired); If the sync worked, this should have fired. t.assertTrue(handler.fired >= 0);


console.debug("Fired success callback."); d.callback(true);

}); handler.addErrback(function(data){

console.debug("Fired error callback."); d.callback(false);

}); return d;


The above always fails. The deferred shows unfired, when it should already have been fired.

Change History (3)

comment:1 Changed 15 years ago by alex

(In [8016]) potential fix for sync requests. Refs #2716. Needs verification

comment:2 Changed 15 years ago by alex

Resolution: fixed
Status: newclosed

comment:3 Changed 15 years ago by (none)

Milestone: 0.9M2

Milestone 0.9M2 deleted

Note: See TracTickets for help on using tickets.