about summary refs log blame commit diff stats
path: root/test/js/xhr.html
blob: 4bd66b956c28f7b544110eb0ef631240ea2707c3 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
















                                                     
<!doctype html>
<title>onclick setter/getter</title>
<div id=x>Fail</div>
<script src=asserts.js></script>
<script>
const x = new XMLHttpRequest();
assert(x.onreadystatechange === null);
function myFunction() {
	console.log("change");
}
x.onreadystatechange = myFunction;
assert(myFunction === x.onreadystatechange);
assert(x.readyState === XMLHttpRequest.UNSENT);
x.open("GET", "");
document.getElementById("x").textContent = "Success";
x.send();
</script>