Guest User

Untitled

a guest
Apr 16th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. for(var i = 0; i < confs.length; i++ ) {
  2.  
  3. var configData = conf[i].data
  4.  
  5. var xhr = new XMLHttpRequest();
  6. xhr.open('GET', url, true);
  7. xhr.send();
  8. xhr.onreadystatechange = function() {
  9. if (this.readyState != 4) return;
  10. if (this.status != 200) {
  11. return;
  12. }
  13.  
  14. myMethod(configData);
  15. };
  16. }
  17.  
  18. var xhr = new XMLHttpRequest();
  19. xhr.open('GET', url, true);
  20. xhr.configData = confs[i].data;
  21. xhr.onreadystatechange = function() {
  22. if (this.readyState != 4) return;
  23. if (this.status != 200) {
  24. return;
  25. }
  26. myMethod(this.configData);
  27. };
  28. xhr.send();
  29.  
  30. let configData = confs[i].data;
Add Comment
Please, Sign In to add comment