- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
var XMLHttpRequest = function(XHR, type, listener) {
return function() {
var xhr = new XHR;
xhr.addEventListener(type, listener);
return xhr;
};
}(XMLHttpRequest, 'loadend', function(e) {
if (this.status == 0) {
console.log(e.type, 'network error');
} else {
console.log(e.type, this.status);
}
});
// js-library code...
yet_another_one_shit 07.07.2019 10:56 # +1
bootcamp_dropout 07.07.2019 12:20 # +2
KaBauHblu_nemyx 09.07.2019 23:40 # +1