title: Problem with XMLHttpRequest.DONE values supported in FF / Chrome
body: <p>I have a snippet of Javascript that I need to debug:</p>
  <pre><code>var httpRequest = new XMLHttpRequest();
  httpRequest.onreadystatechange = function() {
      if (this.readyState === XMLHttpRequest.DONE) {
          if (this.status === 200) {
              success = true;
          }
      }
  };
  </code></pre>
  <p>Stepping through on Chrome and Firefox, I have found that the first &quot;if&quot; is failing.  I can see that <code>this.readyState</code> is set to <code>1</code>, which judging by the W3C spec should mean <code>OPENED</code>.  However <code>XMLHttpRequest.DONE</code> shows as <code>undefined</code> rather than <code>4</code> in Firebug.</p>
  <p><a href="http://www.w3.org/TR/XMLHttpRequest/#states" rel="nofollow noreferrer">http://www.w3.org/TR/XMLHttpRequest/#states</a></p>
  <p>Is there a problem in Firefox and Chrome whereby these values are not supported?</p>