workerxhr-simple.js (246B)
1 var xhr=new XMLHttpRequest() 2 xhr.onreadystatechange = function(){ 3 if(xhr.readyState == 4){ 4 var status = xhr.responseText === 'bottom\n' ? 'PASSED' : 'FAILED' 5 self.postMessage(status) 6 } 7 } 8 xhr.open('GET', 'folder.txt', true) 9 xhr.send()