YUI io now supports synchronous transactions for same-domain requests. To
enable synchronous transactions, set the configuration property sync to
true; the default behavior is false. During a synchronous request, all io
events will fire, and response data are accessible through the events.
Response data are also returned by io, as an alternative. [Ticket #2528181]
For example:
var request = Y.io(uri, { sync: true });
request will contain the following fields, when the tx is complete:
id
status
statusText
getResponseHeader()
getAllResponseHeaders()
responseText
responseXML
arguments
When making synchronous requests:
- The transaction cannot be aborted,
- The transaction's progress cannot be monitored.