daily pastebin goal
34%
SHARE
TWEET

Untitled

a guest Apr 16th, 2018 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top