mirror of
https://github.com/socketio/socket.io.git
synced 2026-04-30 03:00:39 -04:00
Fixed style
This commit is contained in:
@@ -141,8 +141,10 @@ util.inherits(Request, EventEmitter);
|
||||
*/
|
||||
|
||||
Request.prototype.create = function () {
|
||||
var xhr = this.xhr = util.request(this.xd);
|
||||
this.xhr.open(this.method, this.uri, this.async);
|
||||
var xhr = this.xhr = util.request(this.xd)
|
||||
, self = this
|
||||
|
||||
xhr.open(this.method, this.uri, this.async);
|
||||
|
||||
if ('POST' == this.method) {
|
||||
try {
|
||||
@@ -156,9 +158,9 @@ Request.prototype.create = function () {
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
if (this.xd && global.XDomainRequest && this.xhr instanceof XDomainRequest) {
|
||||
this.xhr.onerror = function () {
|
||||
self.onError();
|
||||
if (this.xd && global.XDomainRequest && xhr instanceof XDomainRequest) {
|
||||
xhr.onerror = function (e) {
|
||||
self.onError(e);
|
||||
};
|
||||
this.xhr.onload = function () {
|
||||
self.onData(xhr.responseText);
|
||||
|
||||
Reference in New Issue
Block a user