Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for(var i = 0; i < confs.length; i++ ) {
- var configData = conf[i].data
- var xhr = new XMLHttpRequest();
- xhr.open('GET', url, true);
- xhr.send();
- xhr.onreadystatechange = function() {
- if (this.readyState != 4) return;
- if (this.status != 200) {
- return;
- }
- myMethod(configData);
- };
- }
- var xhr = new XMLHttpRequest();
- xhr.open('GET', url, true);
- xhr.configData = confs[i].data;
- xhr.onreadystatechange = function() {
- if (this.readyState != 4) return;
- if (this.status != 200) {
- return;
- }
- myMethod(this.configData);
- };
- xhr.send();
- let configData = confs[i].data;
Add Comment
Please, Sign In to add comment