Fixed in commit
http://github.com/thatcher/env-js/commit/2cc8e59da146072ba79c5a07cc...
Please close
regarding XMLHttpRequest.js
// it would be nice if these were part of the standard but
// they are not.
XMLHttpRequest.UNSENT = 0;
XMLHttpRequest.OPEN = 0;
XMLHttpRequest.HEADERS_RECEIVED = 0;
XMLHttpRequest.LOADING = 0;
XMLHttpRequest.DONE = 4;
True they not in the spec as pure javascript values.
Safari/Chrome does expose them as
XMLHttpRequest.UNSENT = 0;
XMLHttpRequest.OPEN = 1;
XMLHttpRequest.HEADERS_RECEIVED = 2;
XMLHttpRequest.LOADING = 3;
XMLHttpRequest.DONE = 4;
. Firefox does not, IE don't know. Certainly have envjs.org
defining the first four to be "0" seems odd. (And using them in the
code would make it more readable).
The following micro script might be useful for testing
<html><head><title>XMLHttpRequest</title></head><body>
<pre><script type="text/javascript">
var x= new XMLHttpRequest();
for (var i in x) {
document.write(i + ": " + x[i] + "\n");
}
</script></pre></body></html>
The spec http://www.w3.org/TR/XMLHttpRequest/ says:
// states const unsigned short UNSENT = 0; const unsigned short
OPENED = 1; const unsigned short HEADERS_RECEIVED = 2; const
unsigned short LOADING = 3; const unsigned short DONE = 4; readonly
attribute unsigned short readyState;