001.js (392B)
1 var xhr = new XMLHttpRequest(); 2 var log = ''; 3 xhr.onreadystatechange = function(e) { 4 if (this.readyState == 4) { 5 if (this.responseXML != null) 6 log += 'responseXML was not null. '; 7 if (this.responseText != '<x>foo</x>') 8 log += 'responseText was ' + this.responseText + ', expected <x>foo</x>. '; 9 postMessage(log); 10 } 11 } 12 xhr.open('GET', '001-1.xml', true); 13 xhr.send();