1 <script> 2 var req = new XMLHttpRequest; 3 req.open("GET", "simple.txt", false); 4 req.send(null); 5 if (req.responseText.length > 0) 6 parent.postMessage("allDone", "*"); 7 </script> 8