title: Should I call XMLHttpRequest async within promise?
body: <p>I use a basic <code>XMLHttpRequest</code> within a <code>promise</code>. Due to the async nature of the <code>promise</code>, I always assumed that having the <code>XMLHttpRequest</code> sync is fine, but since my browser is warning me about it I wanted to make sure.</p>
  
  <p>A <code>mwe</code> would be:</p>
  
  <pre><code>call(arg) {
      return new Promise(resolve =&gt; {
          let xhr = new XMLHttpRequest();
          xhr.open('GET', 'http://localhost:8080?' + arg.name, false);
          xhr.send();
          resolve({body: {result: xhr.responseText}});
      });
  }
  </code></pre>