Init. Map does not function and only working on backend at the moment.

This commit is contained in:
eetnaviation
2024-03-15 22:15:20 +02:00
commit d521b9db0c
1488 changed files with 252767 additions and 0 deletions

View File

@ -0,0 +1,32 @@
var sys = require("util")
, assert = require("assert")
, XMLHttpRequest = require("../lib/XMLHttpRequest").XMLHttpRequest
, xhr;
xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if (this.readyState == 4) {
assert.equal("Hello World", this.responseText);
runSync();
}
};
// Async
var url = "file://" + __dirname + "/testdata.txt";
xhr.open("GET", url);
xhr.send();
// Sync
var runSync = function() {
xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if (this.readyState == 4) {
assert.equal("Hello World", this.responseText);
console.log("done");
}
};
xhr.open("GET", url, false);
xhr.send();
}