make Request module do synchronous requests by default since XMLHttpRequest processes the event queue nowadays during synchronous requests, so all our requests will be synchronous (otherwise we would have used Sync.js to make them synchronous anyway)

--HG--
extra : rebase_source : 2db75bf16f935ad8610145939ffaedfab184dfc8
This commit is contained in:
Myk Melez 2009-06-05 17:37:28 -07:00
Родитель f8dc926cad
Коммит c7b7f9092b
1 изменённых файлов: 18 добавлений и 2 удалений

Просмотреть файл

@ -76,8 +76,24 @@ function Request(args) {
Request.prototype = {
method: "GET",
async: true,
body: null
async: false,
body: null,
get status() this._request.status,
// Sometimes getting statusText throws. When it does, we return the exception
// instead, which seems more useful.
get statusText() {
try {
return this._request.statusText;
}
catch(ex) {
return ex;
}
},
get responseText() this._request.responseText,
get channel() this._request.channel
};
function Callback(func, thisObject) {