mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-25 08:54:10 +00:00
refactor(load) ajax: Events.add -> xhr.onreadystatechange
This commit is contained in:
parent
4e7a211b75
commit
995860b963
1 changed files with 3 additions and 3 deletions
|
|
@ -189,12 +189,12 @@
|
|||
else
|
||||
data = p.data;
|
||||
|
||||
Events.add('readystatechange', xhr, function(event) {
|
||||
xhr.onreadystatechange = function(event) {
|
||||
var TYPE_JSON, type, data, isContain, notText,
|
||||
xhr = event.target,
|
||||
OK = 200;
|
||||
|
||||
if (xhr.readyState === 4 /* Complete */) {
|
||||
if (xhr.readyState === xhr.DONE) {
|
||||
Images.clearProgress();
|
||||
TYPE_JSON = 'application/json';
|
||||
type = xhr.getResponseHeader('content-type');
|
||||
|
|
@ -212,7 +212,7 @@
|
|||
Util.exec(p.success, data, xhr.statusText, xhr);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
xhr.send(data);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue